From c832151fa5bd6955bd12a0f461617b97137c7133 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Mon, 29 Nov 2010 20:53:26 +0000 Subject: MOHAWK: Implement slider value setting svn-id: r54608 --- engines/mohawk/myst_areas.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'engines/mohawk') 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; } -- cgit v1.2.3