Implement conditions for the modal to show:
- reset the QUIT event to prevent the modal from closing immediately
- only show the modal when exitLock is set by the program
The goal is to ask user confirmation when the property exitLock is set.
Director would prevent the user from quitting in such a case.
Note: The modal doesn't show up.
Before, the code for setting a button's hilite flag made it so that
mouseUp only ever went to the last sprite that had a mouseDown
event. That is not correct. Whatever sprite the mouse goes up on
gets the event, even if it didn't get the last mouseDown event.
processTransitionEvent skipped passing events to the window manager
and sent them directly to the current window, which is no good since the
event may need to go to another window. It also broke stopping
transitions on click.
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
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