Commit graph

107 commits

Author SHA1 Message Date
djsrv
1a0393bc19 DIRECTOR: Consider buttons to respond to mouse
Even without scripts, respondsToMouse and isActive should treat
buttons as if they have scripts since they change visually.
2021-08-23 16:10:44 -04:00
ysj1173886760
c4fac4e2b7 DIRECTOR: move warnings to deeper debug levels. 2021-08-20 19:21:28 +08:00
ysj1173886760
8e8f640e69 DIRECTOR: fix editableText both in D2/3 and in D4. 2021-08-18 20:19:18 +08:00
ysj1173886760
1325c02252 DIRECTOR: store the original size for stretched sprite 2021-08-08 17:18:59 +08:00
ysj1173886760
1dfd722735 DIRECTOR: supporting inverting QDShape 2021-08-03 16:14:50 +08:00
ysj1173886760
6d2131801f DIRECTOR: use sprite type to guide creating widget, instead of overwrite cast type 2021-07-19 10:41:22 +08:00
ysj1173886760
8c58acc8d8 DIRECTOR: don't render if sprite type is conflict with cast type, instead of override cast type 2021-07-19 10:41:22 +08:00
djsrv
9dfce6ec11 DIRECTOR: Add FIXME comments to Sprite::setCast 2021-07-16 23:19:05 -04:00
djsrv
307bf94beb DIRECTOR: Improve Sprite::setCast behavior 2021-07-16 23:19:05 -04:00
ysj1173886760
c7dd7d6a3f DIRECTOR: set castmember to null when sprite is bitmap sprite and sprite type doesn't match cast type 2021-07-14 18:00:49 +08:00
djsrv
22cb3a4d40 DIRECTOR: Reorder autohilite logic
These checks apparently need to be done in a specific order. If in D3 no
cast info is found, the auto hilite check cannot be performed, so it
falls back to the matte check.
2021-07-11 02:04:25 -04:00
ysj1173886760
c31abdc0d7 DIRECTOR: amend version check in shouldHilite in sprite 2021-07-11 10:49:01 +08:00
ysj1173886760
ee52e2274c DIRECTOR: eliminate forcing dims when setting cast in lingo 2021-07-08 10:10:07 +08:00
ysj1173886760
67f20656b5 DIRECTOR: use highest bit of _inkData of sprite to decide whether to scale bitmap castmember 2021-07-08 10:08:22 +08:00
ysj1173886760
4ba52620e5 DIRECTOR: delete creating quick matte. 2021-07-08 02:25:11 +02:00
ysj1173886760
d92c06617b DIRECTOR: fixing createQDMatte 2021-07-08 02:25:11 +02:00
ysj1173886760
b152fc82aa DIRECTOR: amend setting sprites dims. 2021-07-08 02:25:11 +02:00
ysj1173886760
6c8d4f3367 DIRECTOR: force to modify sprite dims when we are setting cast though lingo 2021-07-08 02:25:11 +02:00
ysj1173886760
d8d43958e8 DIRECTOR: use initialRect for sprite dims when ink type is copy 2021-07-08 02:25:11 +02:00
ysj1173886760
13f5460ca4 DIRECTOR: only use the original sprites when we have to scale down the bitmap cast member 2021-07-08 02:25:11 +02:00
ysj1173886760
d53064f948 DIRECTOR: amend setting dims for bitmap cast member 2021-07-08 02:25:11 +02:00
ysj1173886760
f9de2bad63 DIRECTOR: use channel's original dims instread of initialRect for bitmap castmember 2021-07-08 02:25:11 +02:00
djsrv
615995fdc1 DIRECTOR: Change member refs to use CastMemberID 2021-06-30 22:32:19 -04:00
ysj1173886760
bcd33eeba3 DIRECTOR: fix rendering text to suit for different style text 2021-06-30 16:29:00 +02:00
ysj1173886760
be199c07ab DIRECTOR: more precise definition for shouldHilite for D3 2021-06-30 16:29:00 +02:00
ysj1173886760
1d20fa758f DIRECTOR: don't hilite puppet sprites. 2021-06-30 16:29:00 +02:00
ysj1173886760
d46866f893 DIRECTOR: implement matte for quick draw shape 2021-06-30 16:29:00 +02:00
ysj1173886760
f097abea02 DIRECTOR: use initialRect to represent sprite dimensions 2021-06-26 16:08:20 +02:00
ysj1173886760
7902d910db DIRECTOR: amend the version check in events and hilite check. add warning for readability 2021-06-20 14:33:53 +02:00
ysj1173886760
01b8afddf5 DIRECTOR: deal with the size of TextCastMember specially. 2021-06-20 14:33:53 +02:00
ysj1173886760
7b99bc7404 DIRECTOR: use inkTypeMatte to check whether hilite or not in D4, which is the same as D3 2021-06-20 14:33:53 +02:00
ysj1173886760
4b28dacaab DIRECTOR: add special check for irregualr button in apartment for drawing hilite 2021-06-20 14:33:53 +02:00
ysj1173886760
31098bbb16 DIRECTOR: modify event handling, introduce _currentHiliteChannelId and _currentHandlingChannelId to movie.
those two are aimed for the situation that when we hold the button and move out of the bounds, then we should de-activated the sprite
_currentHilite are for Bitmap castmember inverting. _currentHandling is for other castmembers, such as macbutton which has it's own check. And also for those sprites which don't need to hilited
2021-06-20 14:33:53 +02:00
djsrv
fbbe79e048 DIRECTOR: Don't hilite moveable sprites in D4 2021-06-07 10:34:13 -04:00
djsrv
1b3501af94 DIRECTOR: Autohilite matte sprites in D3 2021-06-04 19:17:59 -04:00
djsrv
a58cb03c1c DIRECTOR: Improve autohilite behavior
In D3 or higher, there's an autohilite flag in the cast info.
In D2, sprites seem to autohilite only if they have matte ink.
2021-06-04 17:51:25 -04:00
djsrv
9cf248bdec DIRECTOR: Check for cast script in isActive
Either a score script or a cast script can make a sprite respond to
clicks.
2021-06-04 17:51:25 -04:00
Nathanael Gentry
828595c9fc DIRECTOR: Don't override shape dimensions 2020-08-21 16:52:07 -04:00
Nathanael Gentry
0bab9810c0 DIRECTOR: Fix getWidgetRect code path
This is morally equivalent to getWidgetRect, but takes into account the changes
to dimensions that MacText makes for borders and gutters and a text shadow.
Thus, these features are working again.
2020-08-21 16:34:06 -04:00
Eugene Sandulenko
3f160561d6 DIRECTOR: Fixed for 32bpp mode, things work 2020-08-16 23:08:33 +02:00
djsrv
0ff7274993 DIRECTOR: Multiply version numbers by 100
To accomodate minor version.
2020-08-10 15:00:55 -04:00
Nathanael Gentry
e46e81f505 DIRECTOR: Add castNum to null cast warning 2020-08-10 11:58:33 -04:00
Scott Percival
628273226b DIRECTOR: Move digital video properties to channel 2020-08-01 23:15:12 +08:00
djsrv
054b8ddeb0 DIRECTOR: Improve mouse event handling 2020-07-27 16:42:42 -04:00
djsrv
33d07334eb DIRECTOR: Replace isFocusable with respondsToEvent 2020-07-27 12:51:51 -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
djsrv
eae6ab03ec DIRECTOR: Use parent movie in sprite methods 2020-07-24 11:03:35 -04:00
djsrv
fbf42314bb DIRECTOR: Add pointers to frame, sprite parents 2020-07-24 11:03:35 -04:00
Nathanael Gentry
0f5cc7cca8 DIRECTOR: Don't look only for focusable sprites
Instead, there is an option to return the topmost non-focusable sprite, too.
Some scripts don't have buttons on them; they are just there for the hilite.
2020-07-13 17:32:54 -04:00
Nathanael Gentry
c6d7766209 DIRECTOR: Keep sprite dimensions in channel 2020-07-09 23:40:01 -04:00