summaryrefslogtreecommitdiff
path: root/src/network/network_chat_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/network/network_chat_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/network/network_chat_gui.cpp')
-rw-r--r--src/network/network_chat_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index 062858e11..5e7d11821 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -296,7 +296,7 @@ struct NetworkChatWindow : public Window {
* @param type The type of destination.
* @param dest The actual destination index.
*/
- NetworkChatWindow(const WindowDesc *desc, DestType type, int dest) : message_editbox(NETWORK_CHAT_LENGTH)
+ NetworkChatWindow(WindowDesc *desc, DestType type, int dest) : Window(desc), message_editbox(NETWORK_CHAT_LENGTH)
{
this->dtype = type;
this->dest = dest;
@@ -312,7 +312,7 @@ struct NetworkChatWindow : public Window {
assert((uint)this->dtype < lengthof(chat_captions));
this->dest_string = chat_captions[this->dtype];
- this->InitNested(desc, type);
+ this->InitNested(type);
this->SetFocusedWidget(WID_NC_TEXTBOX);
InvalidateWindowData(WC_NEWS_WINDOW, 0, this->height);
@@ -459,7 +459,7 @@ struct NetworkChatWindow : public Window {
free(pre_buf);
}
- virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
+ virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
{
Point pt = { 0, _screen.height - sm_height - FindWindowById(WC_STATUS_BAR, 0)->height };
return pt;
@@ -540,7 +540,7 @@ static const NWidgetPart _nested_chat_window_widgets[] = {
};
/** The description of the chat window. */
-static const WindowDesc _chat_window_desc(
+static WindowDesc _chat_window_desc(
WDP_MANUAL, 640, 14, // x, y, width, height
WC_SEND_NETWORK_MSG, WC_NONE,
0,