diff options
author | frosch <frosch@openttd.org> | 2012-11-14 22:46:49 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-14 22:46:49 +0000 |
commit | f2221e8b89d0e3030679a36bfaaa75c64951aed3 (patch) | |
tree | 7ba134a5e7b25085a35be49ac8ac7c510d6262d9 /src/network | |
parent | fc2b12acca38964ed91d35e3d5c4aae20d992e7f (diff) | |
download | openttd-f2221e8b89d0e3030679a36bfaaa75c64951aed3.tar.xz |
(svn r24736) -Cleanup: The third parameter of Textbuf::Initialize only makes sense if it is smaller than the second one, also its unit is not pixels.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_content_gui.cpp | 3 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 069648001..0df8f8f99 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -281,7 +281,6 @@ class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback { typedef GUIList<const ContentInfo *, StringFilter &> GUIContentList; static const uint EDITBOX_MAX_SIZE = 50; ///< Maximum size of the editbox in characters. - static const uint EDITBOX_MAX_LENGTH = 300; ///< Maximum size of the editbox in pixels. static Listing last_sorting; ///< The last sorting setting. static Filtering last_filtering; ///< The last filtering setting. @@ -418,7 +417,7 @@ public: this->GetWidget<NWidgetStacked>(WID_NCL_SEL_ALL_UPDATE)->SetDisplayedPlane(select_all); this->afilter = CS_ALPHANUMERAL; - this->text.Initialize(this->edit_str_buf, this->edit_str_size, EDITBOX_MAX_LENGTH); + this->text.Initialize(this->edit_str_buf, this->edit_str_size); this->SetFocusedWidget(WID_NCL_FILTER); _network_content_client.AddCallback(this); diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index f1df26d6f..a88d28a26 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -446,7 +446,7 @@ public: ttd_strlcpy(this->edit_str_buf, _settings_client.network.client_name, this->edit_str_size); this->afilter = CS_ALPHANUMERAL; - this->text.Initialize(this->edit_str_buf, this->edit_str_size, 120); + this->text.Initialize(this->edit_str_buf, this->edit_str_size); this->SetFocusedWidget(WID_NG_CLIENT); this->last_joined = NetworkGameListAddItem(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port)); @@ -1009,7 +1009,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { ttd_strlcpy(this->edit_str_buf, _settings_client.network.server_name, this->edit_str_size); this->afilter = CS_ALPHANUMERAL; - this->text.Initialize(this->edit_str_buf, this->edit_str_size, 160); + this->text.Initialize(this->edit_str_buf, this->edit_str_size); this->SetFocusedWidget(WID_NSS_GAMENAME); } |