diff options
-rw-r--r-- | engines/zvision/script_manager.cpp | 12 | ||||
-rw-r--r-- | engines/zvision/script_manager.h | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index b9217e7250..8dd944b1e9 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -275,6 +275,18 @@ bool ScriptManager::onMouseMove(const Common::Point &screenSpacePos, const Commo return cursorWasChanged; } +void ScriptManager::onKeyDown(Common::KeyState keyState) { + for (Common::List<Control *>::iterator iter = _activeControls.begin(); iter != _activeControls.end(); iter++) { + (*iter)->onKeyDown(keyState); + } +} + +void ScriptManager::onKeyUp(Common::KeyState keyState) { + for (Common::List<Control *>::iterator iter = _activeControls.begin(); iter != _activeControls.end(); iter++) { + (*iter)->onKeyUp(keyState); + } +} + void ScriptManager::changeLocation(char world, char room, char node, char view, uint32 offset) { assert(world != 0); debug("Changing location to: %c %c %c %c %u", world, room, node, view, offset); diff --git a/engines/zvision/script_manager.h b/engines/zvision/script_manager.h index 15d456ea6b..274905f88d 100644 --- a/engines/zvision/script_manager.h +++ b/engines/zvision/script_manager.h @@ -110,6 +110,18 @@ public: * @return Was the cursor changed? */ bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos); + /** + * Called when a key is pressed. + * + * @param keycode The key that was pressed + */ + void onKeyDown(Common::KeyState keyState); + /** + * Called when a key is released. + * + * @param keycode The key that was pressed + */ + void onKeyUp(Common::KeyState keyState); void changeLocation(char world, char room, char node, char view, uint32 offset); |