diff options
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst_areas.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp index 7e4fb17c84..009be0feff 100644 --- a/engines/mohawk/myst_areas.cpp +++ b/engines/mohawk/myst_areas.cpp @@ -554,6 +554,23 @@ void MystResourceType10::handleMouseUp(Common::Point *mouse) { // Draw slider drawConditionalDataToScreen(1); + // Save slider value + uint16 value = 0; + if (_flagHV & 2) { + if (_stepsV) { + value = (_pos.y - _minV) / _stepV; + } else { + value = _pos.y; + } + } else if (_flagHV & 1) { + if (_stepsH) { + value = (_pos.x - _minH) / _stepH; + } else { + value = _pos.x; + } + } + _vm->_scriptParser->setVarValue(_var8, value); + // No longer in drag mode _vm->_dragResource = 0; } |