Commit graph

36 commits

Author SHA1 Message Date
Le Philousophe
2a37e2b808 GRAPHICS: MACGUI: Implement drawing primitives
This makes the code comply with the latest API changes.
The drawing calls now need to be optimized for the complex shapes.
2025-01-24 12:11:17 +01:00
Eugene Sandulenko
e5c1ef3fbb
DIRECTOR: Fix regression from 48740a2ad1
The color values went inverted, but in several places they left
untouched.

In general, it is not a good idea to have this hardcoded, but at least
now we have this addressed.
2023-02-10 00:53:38 +01:00
Eugene Sandulenko
3515dc79eb
GRAPHICS: MACGUI: Switch to wider Rect primitives for now
We need to eliminate their usage but that requires more testing
2022-07-13 23:23:03 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
ysj1173886760
36abd91264 GRAPHICS: MACGUI: introduce checkBoxAccess to determines what happens when user clicks the checkbox or radio button 2021-07-29 10:52:45 +08:00
ysj1173886760
a8d7767b36 DIRECTOR: don't highlight buttons in list button style when we are not clicking button initially. 2021-07-28 16:20:48 +08:00
ysj1173886760
b16b2c4b6b GRAPHICS: MACGUI: amend the behaviour for list style button 2021-07-28 15:50:49 +08:00
djsrv
0b7af4209f GRAPHICS: MACGUI: Remove MacButton ctor with encodeType
Encoding is handled in MacFontRun now, so this is no longer needed.
2021-07-12 15:41:21 -04:00
ysj1173886760
832455d812 GRAPHICS: MACGUI: eliminate offset in macbutton. amend the behaviour of setEditable in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
39fc525bf0 DIRECTOR: modify and organize the logic of mactext and macbutton.
eliminated a lot of magic offsets.
reaching nearly 100% reappearance.
2021-06-26 16:08:20 +02:00
ysj1173886760
158406487a GRAPHICS: MACGUI: re-organize the logic of calculating offsets of mactext and macbutton. 2021-06-26 16:08:20 +02:00
ysj1173886760
111bd187bc GRAPHICS: MACGUI: use _active to replace _invertOuter in macbutton 2021-06-20 14:33:53 +02:00
ysj1173886760
93421af649 GRAPHICS: MACGUI: clean the code and write comments for readability 2021-06-20 14:33:53 +02:00
ysj1173886760
36be209490 GRAPHICS: MACGUI: modify macbutton to fit new logic of mactext 2021-06-20 14:33:53 +02:00
ysj1173886760
3517801f05 GRAPHICS: MACGUI: introduce different checkBoxType to macbutton 2021-06-20 14:33:53 +02:00
ysj1173886760
c9c3428ed6 DIRECTOR: use getDrawPixel instead of getDrawInvertPixel to invert button 2021-06-20 14:33:53 +02:00
ysj1173886760
3644f25946 DIRECTOR: fix button hilite 2021-06-20 14:33:53 +02:00
ysj1173886760
29cf9f1454 GRAPHICS: MACGUI: fix macbutton to suit for new mactext code. 2021-06-20 14:33:53 +02:00
Eugene Sandulenko
e604c97607 GRAPHICS: MACGUI: Made MacDrawPixel bpp-aware 2020-08-15 16:09:20 +02:00
Eugene Sandulenko
6d72ebd1e2 GRAPHICS: MACGUI: Made MacButtons and desktop render in 32bpp 2020-08-15 14:50:26 +02:00
djsrv
61cfbdc469 GRAPHICS: MACGUI: Add more colors as properties
Finding the closets color in the current palette is necessary for
transparency in bitmap borders to work.
2020-08-07 16:47:19 -04:00
Scott Percival
4bfffc43a7
DIRECTOR: Move widgets from cast members to channels (#2372)
This change is required to support copies of the same cast member running in different channels.

* DIRECTOR: Move widget ownership from cast member to channel

* DIRECTOR: Cache cast dimensions from createWidget

* DIRECTOR: Add null checks for createWidget

* GRAPHICS: MACGUI: Clear active/hover WM references if the widget is destroyed

* DIRECTOR: LINGO: Re-add null check for kTheEditableText

* DIRECTOR: Avoid destroying widgets if the channel isn't dirty

* DIRECTOR: Fix dirty test

* DIRECTOR: Fix text field writeback

* DIRECTOR: Fix null cast check

* DIRECTOR: Add bbox as argument to createWidget

* DIRECTOR: Add setCast method to Channel

* DIRECTOR: Fix use-after-free in Channel::getMask

* DIRECTOR: Fix bounding box for Button sprites

* DIRECTOR: Cache widget dimensions in cast member

* DIRECTOR: Remove widget from channel if nextSprite is empty

* GRAPHICS: MACGUI: Fix MacText::splitString for empty string case

* DIRECTOR: Add null checks for movie and score in processEvents
2020-07-26 04:32:29 +00:00
Eugene Sandulenko
ed76a70d58 GRAPHICS: MACGUI: Fix warning 2020-07-17 00:30:56 +02:00
Nathanael Gentry
dfd522bbe1 GRAPHICS: MACGUI: Reduce erroneous button activations 2020-07-16 10:31:51 -04:00
Nathanael Gentry
296b42b2c0 GRAPHICS: MACGUI: Don't redundantly clear text surface
This fixes the issue in Director where text redrawing would overwrite the button
indication. Now, the changed-area clearance in MacText::render is the only
clearance of the text surface that occurs.

The contentIsDirty setting is removed from MacButton because this flag is
already reset in MacText::draw.
2020-07-16 00:27:37 -04:00
Nathanael Gentry
d770b21094 GRAPHICS: MACGUI: Remove macInvertPixel callback
Instead, the addition to macDrawPixel is used instead.
2020-07-15 11:50:57 -04:00
Nathanael Gentry
454be019ff DIRECTOR: Remove maskSurface from MacWidget 2020-07-13 13:29:54 -04:00
Nathanael Gentry
63071473af Revert "GRAPHICS: MACGUI: Remove colour settings from base widget"
This reverts commit 39c4a0f524.
2020-07-06 23:15:56 -04:00
Nathanael Gentry
39c4a0f524 GRAPHICS: MACGUI: Remove colour settings from base widget
The Director engine, for which I introduced this setting, has also been updated.
To account for different ink types, the background colour will be applied in the
blitting step, and each text chunk keeps its own palette information.
2020-07-06 23:06:04 -04:00
Nathanael Gentry
1ddc4bf6bd GRAPHICS: MACGUI: MacButton: Properly mark dirty button states 2020-06-30 12:38:46 -04:00
Nathanael Gentry
8dd0c305dd GRAPHICS: MACGUI: Render all of the button 2020-06-23 16:04:17 -04:00
Nathanael Gentry
874526c563 GRAPHICS: MACGUI: Fix button alignment 2020-06-14 10:12:58 -04:00
Nathanael Gentry
45937130dd GRAPHICS: MACGUI: Begin reorganizing text classes
MacEditableText has been merged into MacText. The Director engine, which relies
upon MacEditableText, is also updated here.
2020-06-12 15:27:37 -04:00
Nathanael Gentry
033e025365 GRAPHICS: MACGUI: MacWindowManager: Deactivate widget when mouse leaves 2020-06-10 15:42:49 +02:00
Nathanael Gentry
2eecd518b1 GRAPHICS: MACGUI: MacWidget: Make non-abstract 2020-06-10 15:42:49 +02:00
Nathanael Gentry
d64e41eca2 GRAPHICS: MACGUI: Add MacButton widget 2020-06-10 15:42:49 +02:00