From 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 26 May 2013 19:23:42 +0000 Subject: (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. --- src/bootstrap_gui.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/bootstrap_gui.cpp') 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); } -- cgit v1.2.3-54-g00ecf