aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorBastien Bouclet2010-11-29 20:53:26 +0000
committerBastien Bouclet2010-11-29 20:53:26 +0000
commitc832151fa5bd6955bd12a0f461617b97137c7133 (patch)
tree76c5d310bacfd8a52787eb3b60499c5b1fee8678 /engines/mohawk
parent8da42b4221bd4763abc80397307b5807d14c89f0 (diff)
downloadscummvm-rg350-c832151fa5bd6955bd12a0f461617b97137c7133.tar.gz
scummvm-rg350-c832151fa5bd6955bd12a0f461617b97137c7133.tar.bz2
scummvm-rg350-c832151fa5bd6955bd12a0f461617b97137c7133.zip
MOHAWK: Implement slider value setting
svn-id: r54608
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/myst_areas.cpp17
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;
}