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
This commit is contained in:
Torbjörn Andersson
2009-04-11 20:16:37 +00:00
parent 8fe3735f69
commit a784e6ab98
+3 -1
View File
@@ -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();
}
}