mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user