mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
DIRECTOR: Add Lingo::PrimaryEventHandler
This commit is contained in:
parent
ed66169adf
commit
252c890bf5
@ -105,6 +105,39 @@ Symbol *Lingo::getHandler(Common::String &name) {
|
||||
return _handlers[entityIndex];
|
||||
}
|
||||
|
||||
void Lingo::primaryEventHandler(LEvent event) {
|
||||
/* When an event occurs the message [...] is first sent to a
|
||||
* primary event handler: [... if exists it is executed] and the
|
||||
* event is passed on to other objects unless you explicitly stop
|
||||
* the message by including the dontPassEventCommand in the script
|
||||
* [D4 docs page 77]
|
||||
*/
|
||||
debugC(3, kDebugLingoExec, "STUB: primary event handler (%s) not implemented", _eventHandlerTypes[event]);
|
||||
switch (event) {
|
||||
case kEventMouseDown:
|
||||
case kEventMouseUp:
|
||||
case kEventKeyUp:
|
||||
case kEventKeyDown:
|
||||
case kEventTimeout:
|
||||
// TODO
|
||||
break;
|
||||
default:
|
||||
/* N.B.: No primary event handlers for events other than
|
||||
* keyup, keydown, mouseup, mousedown, timeout
|
||||
* [see: www.columbia.edu/itc/visualarts/r4110/s2001/handouts
|
||||
* /03_03_Event_Hierarchy.pdf]
|
||||
*/
|
||||
warning("primaryEventHandler() on event other than mouseDown, mouseUp, keyUp, keyDown, timeout");
|
||||
}
|
||||
#ifdef DEBUG_DONTPASSEVENT
|
||||
// #define DEBUG_DONTPASSEVENT to simulate raising of the dontPassEvent flag
|
||||
g_lingo->dontPassEvent = true;
|
||||
debugC(3, kDebugLingoExec, "STUB: primaryEventHandler raising dontPassEvent");
|
||||
#else
|
||||
debugC(3, kDebugLingoExec, "STUB: primaryEventHandler not raising dontPassEvent");
|
||||
#endif
|
||||
}
|
||||
|
||||
void Lingo::processInputEvent(LEvent event) {
|
||||
// Primary Event handler
|
||||
// Score Script
|
||||
|
@ -193,6 +193,7 @@ private:
|
||||
// lingo-events.cpp
|
||||
private:
|
||||
void initEventHandlerTypes();
|
||||
void primaryEventHandler(LEvent event);
|
||||
void processInputEvent(LEvent event);
|
||||
void processFrameEvent(LEvent event);
|
||||
void processGenericEvent(LEvent event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user