From 2a0badf2d565ce4bebe2910c88795c0fe51a0341 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Mon, 1 Apr 2013 22:48:22 -0400 Subject: [PATCH] Check if the address field is empty when hitting enter on the multiplayer tab --- src/guiMainMenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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;