summaryrefslogtreecommitdiff
path: root/src/signs_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/signs_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/signs_gui.cpp')
-rw-r--r--src/signs_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index cd4d7e1b8..2290f621a 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -149,11 +149,11 @@ struct SignListWindow : Window, SignList {
int text_offset; ///< Offset of the sign text relative to the left edge of the WID_SIL_LIST widget.
Scrollbar *vscroll;
- SignListWindow(const WindowDesc *desc, WindowNumber window_number) : filter_editbox(MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS)
+ SignListWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc), filter_editbox(MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS)
{
- this->CreateNestedTree(desc);
+ this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_SIL_SCROLLBAR);
- this->FinishInitNested(desc, window_number);
+ this->FinishInitNested(window_number);
this->SetWidgetLoweredState(WID_SIL_FILTER_MATCH_CASE_BTN, SignList::match_case);
/* Initialize the text edit widget */
@@ -369,7 +369,7 @@ static const NWidgetPart _nested_sign_list_widgets[] = {
EndContainer(),
};
-static const WindowDesc _sign_list_desc(
+static WindowDesc _sign_list_desc(
WDP_AUTO, 358, 138,
WC_SIGN_LIST, WC_NONE,
0,
@@ -412,14 +412,14 @@ struct SignWindow : Window, SignList {
QueryString name_editbox;
SignID cur_sign;
- SignWindow(const WindowDesc *desc, const Sign *si) : name_editbox(MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS)
+ SignWindow(WindowDesc *desc, const Sign *si) : Window(desc), name_editbox(MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS)
{
this->querystrings[WID_QES_TEXT] = &this->name_editbox;
this->name_editbox.caption = STR_EDIT_SIGN_CAPTION;
this->name_editbox.cancel_button = WID_QES_CANCEL;
this->name_editbox.ok_button = WID_QES_OK;
- this->InitNested(desc, WN_QUERY_STRING_SIGN);
+ this->InitNested(WN_QUERY_STRING_SIGN);
UpdateSignEditWindow(si);
this->SetFocusedWidget(WID_QES_TEXT);
@@ -531,7 +531,7 @@ static const NWidgetPart _nested_query_sign_edit_widgets[] = {
EndContainer(),
};
-static const WindowDesc _query_sign_edit_desc(
+static WindowDesc _query_sign_edit_desc(
WDP_AUTO, 0, 0,
WC_QUERY_STRING, WC_NONE,
WDF_CONSTRUCTION,