aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2013-07-03 04:41:06 +0300
committerFilippos Karapetis2013-07-03 04:41:52 +0300
commitb60b3bbecd45d17f95d45512023f5e33a6e96e0e (patch)
tree5fc3941a7292e8c44b76ccb0682cc153870c124a /engines
parent42e3c18ed3de4b143b10a1652d53061e750d5d8b (diff)
downloadscummvm-rg350-b60b3bbecd45d17f95d45512023f5e33a6e96e0e.tar.gz
scummvm-rg350-b60b3bbecd45d17f95d45512023f5e33a6e96e0e.tar.bz2
scummvm-rg350-b60b3bbecd45d17f95d45512023f5e33a6e96e0e.zip
NEVERHOOD: Fix save slot selection
My initial suggestion to fix the issue was made in 163023a, which broke the save slot selection logic. The actual save slot selection problem was fixed in commit 2ca36ab
Diffstat (limited to 'engines')
-rw-r--r--engines/neverhood/menumodule.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp
index 8814401f5e..da7abd41e1 100644
--- a/engines/neverhood/menumodule.cpp
+++ b/engines/neverhood/menumodule.cpp
@@ -766,9 +766,7 @@ void SavegameListBox::onClick() {
mousePos.y -= _y + _rect.y1;
if (mousePos.x >= 0 && mousePos.x <= _rect.x2 - _rect.x1 &&
mousePos.y >= 0 && mousePos.y <= _rect.y2 - _rect.y1) {
- // We add 1 to the char height to ensure that the correct entry is chosen if the
- // user clicks at the bottom the text entry
- int newIndex = _firstVisibleItem + mousePos.y / (_fontSurface->getCharHeight() + 1);
+ int newIndex = _firstVisibleItem + mousePos.y / _fontSurface->getCharHeight();
if (newIndex <= _lastVisibleItem) {
_currIndex = newIndex;
refresh();