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/transparency_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/transparency_gui.cpp')
-rw-r--r-- | src/transparency_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index 4c9e4ed7f..449969c50 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -28,9 +28,9 @@ byte _display_opt; ///< What do we want to draw/do? class TransparenciesWindow : public Window { public: - TransparenciesWindow(const WindowDesc *desc, int window_number) : Window() + TransparenciesWindow(WindowDesc *desc, int window_number) : Window(desc) { - this->InitNested(desc, window_number); + this->InitNested(window_number); } virtual void OnPaint() @@ -102,7 +102,7 @@ public: } } - virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number) + virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) { Point pt = GetToolbarAlignedWindowPosition(sm_width); pt.y += 2 * (sm_height - this->GetWidget<NWidgetBase>(WID_TT_BUTTONS)->current_y); @@ -146,7 +146,7 @@ static const NWidgetPart _nested_transparency_widgets[] = { EndContainer(), }; -static const WindowDesc _transparency_desc( +static WindowDesc _transparency_desc( WDP_MANUAL, 0, 0, WC_TRANSPARENCY_TOOLBAR, WC_NONE, 0, |