diff options
author | richiesams | 2013-08-18 15:20:22 -0500 |
---|---|---|
committer | richiesams | 2013-08-18 19:53:01 -0500 |
commit | 25deaf3a35efac8e5103e193f5f68409a87047a0 (patch) | |
tree | 479aa7175c1b50b6d63d255d27b7851c0694f960 /engines/zvision | |
parent | 9051f6213671316c336242274490e17d356fef0e (diff) | |
download | scummvm-rg350-25deaf3a35efac8e5103e193f5f68409a87047a0.tar.gz scummvm-rg350-25deaf3a35efac8e5103e193f5f68409a87047a0.tar.bz2 scummvm-rg350-25deaf3a35efac8e5103e193f5f68409a87047a0.zip |
ZVISION: Reset MouseEvent globalStateValue's when clearing them
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/events.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/zvision/events.cpp b/engines/zvision/events.cpp index bea476fa41..f382bb63e0 100644 --- a/engines/zvision/events.cpp +++ b/engines/zvision/events.cpp @@ -31,6 +31,7 @@ #include "zvision/cursor_manager.h" #include "zvision/render_manager.h" +#include "zvision/script_manager.h" #include "zvision/mouse_event.h" namespace ZVision { @@ -42,6 +43,7 @@ void ZVision::registerMouseEvent(const MouseEvent &event) { bool ZVision::removeMouseEvent(const uint32 key) { for (Common::List<MouseEvent>::iterator iter = _mouseEvents.begin(); iter != _mouseEvents.end(); iter++) { if ((*iter)._key == key) { + _scriptManager->setStateValue((*iter)._key, 0); _mouseEvents.erase(iter); return true; } @@ -51,6 +53,11 @@ bool ZVision::removeMouseEvent(const uint32 key) { } void ZVision::clearAllMouseEvents() { + // Clear the state values of all the events + for (Common::List<MouseEvent>::iterator iter = _mouseEvents.begin(); iter != _mouseEvents.end(); iter++) { + _scriptManager->setStateValue((*iter)._key, 0); + } + _mouseEvents.clear(); } |