summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-06-01 15:08:40 +0000
committerfrosch <frosch@openttd.org>2012-06-01 15:08:40 +0000
commit65f51240cde28ea7d778794f48b8b6d022c8995c (patch)
tree11681a55a17fb77f98175f8bfaf19a48964934e6 /src/settings_gui.cpp
parente240f660f0ea004049d199e0eb36cc69372b8265 (diff)
downloadopenttd-65f51240cde28ea7d778794f48b8b6d022c8995c.tar.xz
(svn r24313) -Fix: Some obiwans wrt. clicking on setting buttons.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index b9a1d974a..4592f2a87 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1788,7 +1788,7 @@ struct GameSettingsWindow : Window {
{
if (widget != WID_GS_OPTIONSPANEL) return;
- uint btn = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GS_OPTIONSPANEL, SETTINGTREE_TOP_OFFSET - 1);
+ uint btn = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GS_OPTIONSPANEL, SETTINGTREE_TOP_OFFSET);
if (btn == INT_MAX) return;
uint cur_row = 0;
@@ -1796,7 +1796,7 @@ struct GameSettingsWindow : Window {
if (pe == NULL) return; // Clicked below the last setting of the page
- int x = (_current_text_dir == TD_RTL ? this->width - pt.x : pt.x) - SETTINGTREE_LEFT_OFFSET - (pe->level + 1) * LEVEL_WIDTH; // Shift x coordinate
+ int x = (_current_text_dir == TD_RTL ? this->width - 1 - pt.x : pt.x) - SETTINGTREE_LEFT_OFFSET - (pe->level + 1) * LEVEL_WIDTH; // Shift x coordinate
if (x < 0) return; // Clicked left of the entry
if ((pe->flags & SEF_KIND_MASK) == SEF_SUBTREE_KIND) {