Changeset - r19813:356772b4771f
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-11-27 21:30:44
frosch@openttd.org
(svn r24768) -Fix: Adjust a comment to reflect some more truth.
1 file changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/network/network_gui.cpp
Show inline comments
 
@@ -834,19 +834,21 @@ public:
 

	
 
		return state;
 
	}
 

	
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_NG_CLIENT) {
 
			/* The name is only allowed when it starts with a letter! */
 
			if (!StrEmpty(this->name_editbox.text.buf) && this->name_editbox.text.buf[0] != ' ') {
 
				strecpy(_settings_client.network.client_name, this->name_editbox.text.buf, lastof(_settings_client.network.client_name));
 
			} else {
 
				strecpy(_settings_client.network.client_name, "Player", lastof(_settings_client.network.client_name));
 
			}
 
		switch (wid) {
 
			case WID_NG_CLIENT:
 
				/* Make sure the name does not start with a space, so TAB completion works */
 
				if (!StrEmpty(this->name_editbox.text.buf) && this->name_editbox.text.buf[0] != ' ') {
 
					strecpy(_settings_client.network.client_name, this->name_editbox.text.buf, lastof(_settings_client.network.client_name));
 
				} else {
 
					strecpy(_settings_client.network.client_name, "Player", lastof(_settings_client.network.client_name));
 
				}
 
				break;
 
		}
 
	}
 

	
 
	virtual void OnQueryTextFinished(char *str)
 
	{
 
		if (!StrEmpty(str)) NetworkAddServer(str);
0 comments (0 inline, 0 general)