projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b8435c
)
Check if the address field is empty when hitting enter on the multiplayer tab
author
ShadowNinja
<noreply@gmail.com>
Tue, 2 Apr 2013 02:48:22 +0000
(22:48 -0400)
committer
PilzAdam
<pilzadam@minetest.net>
Wed, 3 Apr 2013 21:33:17 +0000
(23:33 +0200)
src/guiMainMenu.cpp
patch
|
blob
|
history
diff --git
a/src/guiMainMenu.cpp
b/src/guiMainMenu.cpp
index 4c203003985dfdc18a8900f48314e92ecd1907e1..1e30835776a55bcf354b7a55c258210c6ba1a190 100644
(file)
--- a/
src/guiMainMenu.cpp
+++ b/
src/guiMainMenu.cpp
@@
-1207,6
+1207,15
@@
bool GUIMainMenu::OnEvent(const SEvent& event)
switch(event.GUIEvent.Caller->getID())
{
case GUI_ID_ADDRESS_INPUT: case GUI_ID_PORT_INPUT: case GUI_ID_NAME_INPUT: case 264:
+ MainMenuData cur;
+ readInput(&cur);
+ if (getTab() == TAB_MULTIPLAYER && cur.address == L"")
+ {
+ (new GUIMessageMenu(env, parent, -1, menumgr,
+ wgettext("Address required."))
+ )->drop();
+ return true;
+ }
acceptInput();
quitMenu();
return true;