diff options
Diffstat (limited to 'engines/zvision/push_toggle_control.cpp')
-rw-r--r-- | engines/zvision/push_toggle_control.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/zvision/push_toggle_control.cpp b/engines/zvision/push_toggle_control.cpp index 21a1c41548..2cea5db2d2 100644 --- a/engines/zvision/push_toggle_control.cpp +++ b/engines/zvision/push_toggle_control.cpp @@ -73,9 +73,8 @@ PushToggleControl::~PushToggleControl() { } void PushToggleControl::onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) { - if (!_enabled) { + if (_engine->getScriptManager()->getStateFlag(_key) & Puzzle::DISABLED) return; - } if (_hotspot.contains(backgroundImageSpacePos)) { _engine->getScriptManager()->setStateValue(_key, 1); @@ -83,9 +82,8 @@ void PushToggleControl::onMouseUp(const Common::Point &screenSpacePos, const Com } bool PushToggleControl::onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) { - if (!_enabled) { + if (_engine->getScriptManager()->getStateFlag(_key) & Puzzle::DISABLED) return false; - } if (_hotspot.contains(backgroundImageSpacePos)) { _engine->getCursorManager()->changeCursor(_hoverCursor); |