(svn r13107) -Codechange: make NetworkCompanyPasswordWindow and SelectPlayerFaceWindow children of PlayerCompanyWindow.

This commit is contained in:
glx
2008-05-15 19:24:15 +00:00
parent eeb6381690
commit 6a50687bdc
3 changed files with 23 additions and 24 deletions

View File

@@ -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 */

View File

@@ -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 */