diff options
author | alberth <alberth@openttd.org> | 2009-10-31 11:34:43 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-10-31 11:34:43 +0000 |
commit | 82e21df3a48cc20b8df71a197e1f634eb611240e (patch) | |
tree | c63b1aabbec3a2f11d41e380f48aaa27c808b8b2 /src/window_gui.h | |
parent | 52b2d67200e489f017d520b408cf9509f459e222 (diff) | |
download | openttd-82e21df3a48cc20b8df71a197e1f634eb611240e.tar.xz |
(svn r17915) -Codechange: Allow windows to compute their own initial position.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r-- | src/window_gui.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/window_gui.h b/src/window_gui.h index a78004f89..c31f7ae62 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -639,6 +639,18 @@ public: /*** Event handling ***/ /** + * Compute the initial position of the window. + * @param *desc The pointer to the WindowDesc of the window to create. + * @param sm_width Smallest width of the window. + * @param sm_height Smallest height of the window. + * @param window_number The window number of the new window. + * @return Initial position of the top-left corner of the window. + * + * @note Due to the way C++ works, only windows with nested widgets can usefully override this function. + */ + virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number); + + /** * The window must be repainted. * @note This method should not change any state, it should only use drawing functions. */ |