summaryrefslogtreecommitdiff
path: root/src/bootstrap_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/bootstrap_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/bootstrap_gui.cpp')
-rw-r--r--src/bootstrap_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bootstrap_gui.cpp b/src/bootstrap_gui.cpp
index c71ef2e1c..bfcf7eead 100644
--- a/src/bootstrap_gui.cpp
+++ b/src/bootstrap_gui.cpp
@@ -37,7 +37,7 @@ static const struct NWidgetPart _background_widgets[] = {
/**
* Window description for the background window to prevent smearing.
*/
-static const WindowDesc _background_desc(
+static WindowDesc _background_desc(
WDP_MANUAL, 0, 0,
WC_BOOTSTRAP, WC_NONE,
0,
@@ -47,9 +47,9 @@ static const WindowDesc _background_desc(
/** The background for the game. */
class BootstrapBackground : public Window {
public:
- BootstrapBackground() : Window()
+ BootstrapBackground() : Window(&_background_desc)
{
- this->InitNested(&_background_desc, 0);
+ this->InitNested(0);
CLRBITS(this->flags, WF_WHITE_BORDER);
ResizeWindow(this, _screen.width, _screen.height);
}
@@ -70,7 +70,7 @@ static const NWidgetPart _nested_boostrap_download_status_window_widgets[] = {
};
/** Window description for the download window */
-static const WindowDesc _bootstrap_download_status_window_desc(
+static WindowDesc _bootstrap_download_status_window_desc(
WDP_CENTER, 0, 0,
WC_NETWORK_STATUS_WINDOW, WC_NONE,
WDF_MODAL,
@@ -115,7 +115,7 @@ static const NWidgetPart _bootstrap_query_widgets[] = {
};
/** The window description for the query. */
-static const WindowDesc _bootstrap_query_desc(
+static WindowDesc _bootstrap_query_desc(
WDP_CENTER, 0, 0,
WC_CONFIRM_POPUP_QUERY, WC_NONE,
0,
@@ -128,9 +128,9 @@ class BootstrapAskForDownloadWindow : public Window, ContentCallback {
public:
/** Start listening to the content client events. */
- BootstrapAskForDownloadWindow() : Window()
+ BootstrapAskForDownloadWindow() : Window(&_bootstrap_query_desc)
{
- this->InitNested(&_bootstrap_query_desc, WN_CONFIRM_POPUP_QUERY_BOOTSTRAP);
+ this->InitNested(WN_CONFIRM_POPUP_QUERY_BOOTSTRAP);
_network_content_client.AddCallback(this);
}