aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/push_toggle_control.cpp
diff options
context:
space:
mode:
authorMarisa-Chan2013-11-15 18:10:27 +0000
committerMarisa-Chan2013-11-15 18:10:27 +0000
commit468c44581f4a051d435f8574fa4f689b97188ae2 (patch)
tree2afea2395221a91d887b28798efaec2aba1a3c08 /engines/zvision/push_toggle_control.cpp
parent9363a0d07115368f8964dfca5f48730552ef9855 (diff)
downloadscummvm-rg350-468c44581f4a051d435f8574fa4f689b97188ae2.tar.gz
scummvm-rg350-468c44581f4a051d435f8574fa4f689b97188ae2.tar.bz2
scummvm-rg350-468c44581f4a051d435f8574fa4f689b97188ae2.zip
ZVISION: MouseUp and MouseDown now will return break process loop flag.
Diffstat (limited to 'engines/zvision/push_toggle_control.cpp')
-rw-r--r--engines/zvision/push_toggle_control.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/zvision/push_toggle_control.cpp b/engines/zvision/push_toggle_control.cpp
index 2cea5db2d2..88619e8f97 100644
--- a/engines/zvision/push_toggle_control.cpp
+++ b/engines/zvision/push_toggle_control.cpp
@@ -72,13 +72,15 @@ PushToggleControl::~PushToggleControl() {
_engine->getScriptManager()->setStateValue(_key, 0);
}
-void PushToggleControl::onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {
+bool PushToggleControl::onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {
if (_engine->getScriptManager()->getStateFlag(_key) & Puzzle::DISABLED)
- return;
+ return false;
if (_hotspot.contains(backgroundImageSpacePos)) {
_engine->getScriptManager()->setStateValue(_key, 1);
+ return true;
}
+ return false;
}
bool PushToggleControl::onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {