summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-05-26 19:23:42 +0000
committerfrosch <frosch@openttd.org>2013-05-26 19:23:42 +0000
commit56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch)
treef3e5c225182fce7a451af4e09e943920e0f1cc3c /src/settings_gui.cpp
parentb10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff)
downloadopenttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 3a20f455f..96e2d0fe7 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -160,12 +160,12 @@ struct GameOptionsWindow : Window {
GameSettings *opt;
bool reload;
- GameOptionsWindow(const WindowDesc *desc) : Window()
+ GameOptionsWindow(WindowDesc *desc) : Window(desc)
{
this->opt = &GetGameSettings();
this->reload = false;
- this->InitNested(desc, WN_GAME_OPTIONS_GAME_OPTIONS);
+ this->InitNested(WN_GAME_OPTIONS_GAME_OPTIONS);
this->OnInvalidateData(0);
}
@@ -662,7 +662,7 @@ static const NWidgetPart _nested_game_options_widgets[] = {
EndContainer(),
};
-static const WindowDesc _game_options_desc(
+static WindowDesc _game_options_desc(
WDP_CENTER, 0, 0,
WC_GAME_OPTIONS, WC_NONE,
0,
@@ -1733,7 +1733,7 @@ struct GameSettingsWindow : Window {
Scrollbar *vscroll;
- GameSettingsWindow(const WindowDesc *desc) : filter_editbox(50)
+ GameSettingsWindow(WindowDesc *desc) : Window(desc), filter_editbox(50)
{
static bool first_time = true;
@@ -1756,9 +1756,9 @@ struct GameSettingsWindow : Window {
this->closing_dropdown = false;
this->manually_changed_folding = false;
- this->CreateNestedTree(desc);
+ this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_GS_SCROLLBAR);
- this->FinishInitNested(desc, WN_GAME_OPTIONS_GAME_SETTINGS);
+ this->FinishInitNested(WN_GAME_OPTIONS_GAME_SETTINGS);
this->querystrings[WID_GS_FILTER] = &this->filter_editbox;
this->filter_editbox.cancel_button = QueryString::ACTION_CLEAR;
@@ -2261,7 +2261,7 @@ static const NWidgetPart _nested_settings_selection_widgets[] = {
EndContainer(),
};
-static const WindowDesc _settings_selection_desc(
+static WindowDesc _settings_selection_desc(
WDP_CENTER, 510, 450,
WC_GAME_OPTIONS, WC_NONE,
0,
@@ -2342,9 +2342,9 @@ void DrawBoolButton(int x, int y, bool state, bool clickable)
struct CustomCurrencyWindow : Window {
int query_widget;
- CustomCurrencyWindow(const WindowDesc *desc) : Window()
+ CustomCurrencyWindow(WindowDesc *desc) : Window(desc)
{
- this->InitNested(desc);
+ this->InitNested();
SetButtonState();
}
@@ -2554,7 +2554,7 @@ static const NWidgetPart _nested_cust_currency_widgets[] = {
EndContainer(),
};
-static const WindowDesc _cust_currency_desc(
+static WindowDesc _cust_currency_desc(
WDP_CENTER, 0, 0,
WC_CUSTOM_CURRENCY, WC_NONE,
0,