summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-26 13:03:40 +0000
committeralberth <alberth@openttd.org>2010-07-26 13:03:40 +0000
commit97f85f7bfba286bf9a7c692b390eec8231cac9ae (patch)
tree510a6cb18ef14914b1fa1bd757b8671200f17d35 /src/window_gui.h
parent3a1451644a0eae226545818adbde8a8a8c45eab7 (diff)
downloadopenttd-97f85f7bfba286bf9a7c692b390eec8231cac9ae.tar.xz
(svn r20222) -Add: Add functions to compute the row in a scrolled widget.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index d01e8e4af..49d69ec8b 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -305,6 +305,8 @@ public:
this->SetPosition(position - this->GetCapacity() + 1);
}
}
+
+ int GetScrolledRowFromWidget(int clickpos, const Window * const w, int widget, int padding = 0, int line_height = -1) const;
};
/**
@@ -528,7 +530,7 @@ public:
bool SetFocusedWidget(byte widget_index);
void HandleButtonClick(byte widget);
- int GetRowFromWidget(int clickpos, int widget, int padding, int line_height) const;
+ int GetRowFromWidget(int clickpos, int widget, int padding, int line_height = -1) const;
void RaiseButtons(bool autoraise = false);
void CDECL SetWidgetsDisabledState(bool disab_stat, int widgets, ...);