diff options
author | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
commit | 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch) | |
tree | f3e5c225182fce7a451af4e09e943920e0f1cc3c /src/console_gui.cpp | |
parent | b10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff) | |
download | openttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz |
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/console_gui.cpp')
-rw-r--r-- | src/console_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp index ca0a01853..5787a5089 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -158,7 +158,7 @@ static const struct NWidgetPart _nested_console_window_widgets[] = { NWidget(WWT_EMPTY, INVALID_COLOUR, WID_C_BACKGROUND), SetResize(1, 1), }; -static const WindowDesc _console_window_desc( +static WindowDesc _console_window_desc( WDP_MANUAL, 0, 0, WC_CONSOLE, WC_NONE, 0, @@ -171,13 +171,13 @@ struct IConsoleWindow : Window int line_height; ///< Height of one line of text in the console. int line_offset; - IConsoleWindow() : Window() + IConsoleWindow() : Window(&_console_window_desc) { _iconsole_mode = ICONSOLE_OPENED; this->line_height = FONT_HEIGHT_NORMAL + ICON_LINE_SPACING; this->line_offset = GetStringBoundingBox("] ").width + 5; - this->InitNested(&_console_window_desc, 0); + this->InitNested(0); ResizeWindow(this, _screen.width, _screen.height / 3); } |