summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-09 01:22:29 +0000
committerrubidium <rubidium@openttd.org>2009-02-09 01:22:29 +0000
commit861e9cefb3c31f1cab46ddb068af7a3648f45b4a (patch)
tree2efbc4cf44063706f8bd6b787f55a92c57290fbb /src/network
parent9907742a0f73bdbbf578cd2b6c424b80d254fed1 (diff)
downloadopenttd-861e9cefb3c31f1cab46ddb068af7a3648f45b4a.tar.xz
(svn r15424) -Codechange: make it possible to have multiple windows with edit box open simultaniously (Zuu).
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_chat_gui.cpp2
-rw-r--r--src/network/network_content_gui.cpp1
-rw-r--r--src/network/network_gui.cpp3
3 files changed, 6 insertions, 0 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index 8b538d62b..a5336c126 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -278,6 +278,7 @@ public:
this->dest = dest;
this->afilter = CS_ALPHANUMERAL;
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, 0);
+ this->SetFocusedWidget(NWCW_TEXTBOX);
InvalidateWindowData(WC_NEWS_WINDOW, 0, this->height);
@@ -480,6 +481,7 @@ public:
SendChat(this->text.buf, this->dtype, this->dest);
/* FALLTHROUGH */
case HEBR_CANCEL: delete this; break;
+ case HEBR_NOT_FOCUSED: break;
}
}
return state;
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 3c56a69c8..0be1d2471 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -317,6 +317,7 @@ public:
ttd_strlcpy(this->edit_str_buf, "", this->edit_str_size);
this->afilter = CS_ALPHANUMERAL;
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, EDITBOX_MAX_LENGTH);
+ this->SetFocusedWidget(NCLWW_FILTER);
this->vscroll.cap = 14;
this->resize.step_height = 14;
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 5ba9b0451..bcea4a232 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -308,6 +308,7 @@ public:
ttd_strlcpy(this->edit_str_buf, _settings_client.network.client_name, this->edit_str_size);
this->afilter = CS_ALPHANUMERAL;
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, 120);
+ this->SetFocusedWidget(NGWW_CLIENT);
UpdateNetworkGameWindow(true);
@@ -879,6 +880,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
this->afilter = CS_ALPHANUMERAL;
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, 160);
+ this->SetFocusedWidget(NSSW_GAMENAME);
this->field = NSSW_GAMENAME;
@@ -1882,6 +1884,7 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow {
this->parent = parent;
this->afilter = CS_ALPHANUMERAL;
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, 0);
+ this->SetFocusedWidget(NCPWW_PASSWORD);
this->FindWindowPlacementAndResize(desc);
}