From a784e6ab980976d03c141d2cf68e0e601e596d2b Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 11 Apr 2009 20:16:37 +0000 Subject: 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 --- engines/saga/interface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(_optionSaveFileTop, 0, _vm->getSaveFilesCount() - _vm->getDisplayInfo().optionSaveFileVisible); + _optionSaveFileTop = CLIP(_optionSaveFileTop, 0, totalFiles - visibleFiles); calcOptionSaveSlider(); } } -- cgit v1.2.3