diff options
author | alberth <alberth@openttd.org> | 2009-07-04 15:35:36 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-07-04 15:35:36 +0000 |
commit | d65c6cae545f36e7f25efcee0b28bbfac7d64769 (patch) | |
tree | 88411cfe473c05b2abb2c6afdce7932f660312cd /src/window_gui.h | |
parent | 2385aeae3c3b065fac37724334469f1ed9ea29f3 (diff) | |
download | openttd-d65c6cae545f36e7f25efcee0b28bbfac7d64769.tar.xz |
(svn r16740) -Codechange: Self-sizing widgets in intro screen, town directory, and found town windows.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r-- | src/window_gui.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/window_gui.h b/src/window_gui.h index 552c0a6e2..e399eb06a 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -501,6 +501,20 @@ public: virtual void DrawWidget(const Rect &r, int widget) const {} /** + * Compute size of the contents of a widget. + * If no useful size can be computed, return null-size (both width and height \c 0). + * @param widget Number of the widget to get the size of. + * @return Size of the contents of the widget. + * @note If the contents ever becomes larger than what is returned here, the window should be re-initialized (with #Window::ReInit), + * and this function should return a larger size. + */ + virtual Dimension GetWidgetContentSize(int widget) + { + Dimension d = {0, 0}; + return d; + } + + /** * Called when window gains focus */ virtual void OnFocus() {} |