diff options
author | ShadowNinja <noreply@gmail.com> | 2013-04-01 22:48:22 -0400 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-04-03 23:33:17 +0200 |
commit | 2a0badf2d565ce4bebe2910c88795c0fe51a0341 (patch) | |
tree | a1bcdca25cb0a48acce9ddef143584b170eb6872 | |
parent | 6b8435cf8c92b0d6e2988a7c5034148bd74d387b (diff) | |
download | minetest-2a0badf2d565ce4bebe2910c88795c0fe51a0341.tar.gz minetest-2a0badf2d565ce4bebe2910c88795c0fe51a0341.tar.bz2 minetest-2a0badf2d565ce4bebe2910c88795c0fe51a0341.zip |
Check if the address field is empty when hitting enter on the multiplayer tab
-rw-r--r-- | src/guiMainMenu.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp index 4c2030039..1e3083577 100644 --- 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; |