summaryrefslogtreecommitdiff
path: root/src/fios_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/fios_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/fios_gui.cpp')
-rw-r--r--src/fios_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 498798b13..e186c7e12 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -243,7 +243,7 @@ public:
this->filename_editbox.text.UpdateSize();
}
- SaveLoadWindow(const WindowDesc *desc, SaveLoadDialogMode mode) : filename_editbox(64)
+ SaveLoadWindow(WindowDesc *desc, SaveLoadDialogMode mode) : Window(desc), filename_editbox(64)
{
static const StringID saveload_captions[] = {
STR_SAVELOAD_LOAD_CAPTION,
@@ -267,12 +267,12 @@ public:
this->querystrings[WID_SL_SAVE_OSK_TITLE] = &this->filename_editbox;
this->filename_editbox.ok_button = WID_SL_SAVE_GAME;
- this->CreateNestedTree(desc, true);
+ this->CreateNestedTree(true);
if (mode == SLD_LOAD_GAME) this->GetWidget<NWidgetStacked>(WID_SL_CONTENT_DOWNLOAD_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
this->GetWidget<NWidgetCore>(WID_SL_CAPTION)->widget_data = saveload_captions[mode];
this->vscroll = this->GetScrollbar(WID_SL_SCROLLBAR);
- this->FinishInitNested(desc, 0);
+ this->FinishInitNested(0);
this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST);
@@ -696,7 +696,7 @@ public:
};
/** Load game/scenario */
-static const WindowDesc _load_dialog_desc(
+static WindowDesc _load_dialog_desc(
WDP_CENTER, 500, 294,
WC_SAVELOAD, WC_NONE,
0,
@@ -704,7 +704,7 @@ static const WindowDesc _load_dialog_desc(
);
/** Load heightmap */
-static const WindowDesc _load_heightmap_dialog_desc(
+static WindowDesc _load_heightmap_dialog_desc(
WDP_CENTER, 257, 320,
WC_SAVELOAD, WC_NONE,
0,
@@ -712,7 +712,7 @@ static const WindowDesc _load_heightmap_dialog_desc(
);
/** Save game/scenario */
-static const WindowDesc _save_dialog_desc(
+static WindowDesc _save_dialog_desc(
WDP_CENTER, 500, 294,
WC_SAVELOAD, WC_NONE,
0,
@@ -740,7 +740,7 @@ void ShowSaveLoadDialog(SaveLoadDialogMode mode)
{
DeleteWindowById(WC_SAVELOAD, 0);
- const WindowDesc *sld;
+ WindowDesc *sld;
switch (mode) {
case SLD_SAVE_GAME:
case SLD_SAVE_SCENARIO: