aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-04-11 20:16:37 +0000
committerTorbjörn Andersson2009-04-11 20:16:37 +0000
commita784e6ab980976d03c141d2cf68e0e601e596d2b (patch)
tree252ba88f20ce7a3281dfe93eb3f067a677ab19ac
parent8fe3735f69307894d52efc4ae2ff061549940946 (diff)
downloadscummvm-rg350-a784e6ab980976d03c141d2cf68e0e601e596d2b.tar.gz
scummvm-rg350-a784e6ab980976d03c141d2cf68e0e601e596d2b.tar.bz2
scummvm-rg350-a784e6ab980976d03c141d2cf68e0e601e596d2b.zip
When dragging the save/load dialog's scrollbar handle past the top of the
scrollbar, stay at the top. Don't jump to the bottom. svn-id: r39939
-rw-r--r--engines/saga/interface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index ded7faa260..e6755c6dc0 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -1437,6 +1437,8 @@ void Interface::handleOptionUpdate(const Point& mousePoint) {
_optionPanel.calcPanelButtonRect(_optionSaveFileSlider, rect);
mouseY = mousePoint.y - rect.top -_optionSaveFileMouseOff;
+ if (mouseY < 0)
+ mouseY = 0;
if (totalFiles - visibleFiles <= 0) {
_optionSaveFileTop = 0;
@@ -1445,7 +1447,7 @@ void Interface::handleOptionUpdate(const Point& mousePoint) {
(_optionSaveFileSlider->height - _optionSaveRectSlider.height());
}
- _optionSaveFileTop = CLIP<uint>(_optionSaveFileTop, 0, _vm->getSaveFilesCount() - _vm->getDisplayInfo().optionSaveFileVisible);
+ _optionSaveFileTop = CLIP<uint>(_optionSaveFileTop, 0, totalFiles - visibleFiles);
calcOptionSaveSlider();
}
}