aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/push_toggle_control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/push_toggle_control.cpp')
-rw-r--r--engines/zvision/push_toggle_control.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/zvision/push_toggle_control.cpp b/engines/zvision/push_toggle_control.cpp
index be038e767a..f4c0bc987e 100644
--- a/engines/zvision/push_toggle_control.cpp
+++ b/engines/zvision/push_toggle_control.cpp
@@ -71,12 +71,20 @@ PushToggleControl::~PushToggleControl() {
}
void PushToggleControl::onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {
+ if (!_enabled) {
+ return;
+ }
+
if (_hotspot.contains(backgroundImageSpacePos)) {
_engine->getScriptManager()->setStateValue(_key, 1);
}
}
bool PushToggleControl::onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {
+ if (!_enabled) {
+ return false;
+ }
+
if (_hotspot.contains(backgroundImageSpacePos)) {
_engine->getCursorManager()->changeCursor(_hoverCursor);
return true;