From fd55399167115dbb06e77bb03f85681ba318f5f2 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 13 Nov 2012 21:46:54 +0000 Subject: (svn r24731) -Codechange: Remove OnOpenOSKWindow and instead specify OK and CANCEL buttons via QueryString members. --- src/network/network_chat_gui.cpp | 7 ++----- src/network/network_gui.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/network') diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index a6a63703d..4c1551347 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -299,6 +299,8 @@ struct NetworkChatWindow : public QueryStringBaseWindow { { this->dtype = type; this->dest = dest; + this->cancel_button = WID_NC_CLOSE; + this->ok_button = WID_NC_SENDBUTTON; this->afilter = CS_ALPHANUMERAL; this->text.Initialize(this->edit_str_buf, this->edit_str_size); @@ -521,11 +523,6 @@ struct NetworkChatWindow : public QueryStringBaseWindow { return state; } - virtual void OnOpenOSKWindow(int wid) - { - ShowOnScreenKeyboard(this, wid, WID_NC_CLOSE, WID_NC_SENDBUTTON); - } - /** * Some data on this window has become invalid. * @param data Information about the changed data. diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 0174497bd..94c2e3805 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -2123,6 +2123,8 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow { this->InitNested(desc, 0); this->parent = parent; + this->cancel_button = WID_NCP_CANCEL; + this->ok_button = WID_NCP_OK; this->afilter = CS_ALPHANUMERAL; this->text.Initialize(this->edit_str_buf, this->edit_str_size); this->SetFocusedWidget(WID_NCP_PASSWORD); @@ -2171,11 +2173,6 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow { } return state; } - - virtual void OnOpenOSKWindow(int wid) - { - ShowOnScreenKeyboard(this, wid, WID_NCP_CANCEL, WID_NCP_OK); - } }; static const NWidgetPart _nested_network_company_password_window_widgets[] = { -- cgit v1.2.3-70-g09d2