summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gui.cpp7
-rw-r--r--src/network/network_gui.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 55a1853f8..b4c2e0c33 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1932,8 +1932,9 @@ enum NetworkCompanyPasswordWindowWidgets {
};
struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow {
- NetworkCompanyPasswordWindow(const WindowDesc *desc) : QueryStringBaseWindow(desc)
+ NetworkCompanyPasswordWindow(const WindowDesc *desc, Window *parent) : QueryStringBaseWindow(desc)
{
+ this->parent = parent;
this->afilter = CS_ALPHANUMERAL;
InitializeTextBuffer(&this->text, this->edit_str_buf, min(lengthof(_network_default_company_pass), lengthof(this->edit_str_buf)), 0);
@@ -2021,11 +2022,11 @@ static const WindowDesc _ncp_window_desc = {
NULL
};
-void ShowNetworkCompanyPasswordWindow()
+void ShowNetworkCompanyPasswordWindow(Window *parent)
{
DeleteWindowById(WC_COMPANY_PASSWORD_WINDOW, 0);
- new NetworkCompanyPasswordWindow(&_ncp_window_desc);
+ new NetworkCompanyPasswordWindow(&_ncp_window_desc, parent);
}
#endif /* ENABLE_NETWORK */
diff --git a/src/network/network_gui.h b/src/network/network_gui.h
index 20fb528f8..46cd67826 100644
--- a/src/network/network_gui.h
+++ b/src/network/network_gui.h
@@ -5,6 +5,8 @@
#ifndef NETWORK_GUI_H
#define NETWORK_GUI_H
+#include "../window_type.h"
+
#ifdef ENABLE_NETWORK
#include "network_data.h"
@@ -15,7 +17,7 @@ void ShowNetworkChatQueryWindow(DestType type, int dest);
void ShowJoinStatusWindow();
void ShowNetworkGameWindow();
void ShowClientList();
-void ShowNetworkCompanyPasswordWindow();
+void ShowNetworkCompanyPasswordWindow(Window *parent);
#else /* ENABLE_NETWORK */
/* Network function stubs when networking is disabled */
@@ -23,7 +25,7 @@ void ShowNetworkCompanyPasswordWindow();
static inline void ShowNetworkChatQueryWindow(byte desttype, int dest) {}
static inline void ShowClientList() {}
static inline void ShowNetworkGameWindow() {}
-static inline void ShowNetworkCompanyPasswordWindow() {}
+static inline void ShowNetworkCompanyPasswordWindow(Window *parent) {}
#endif /* ENABLE_NETWORK */