Skip to content
Permalink
Browse files

Check if the address field is empty when hitting enter on the multipl…

…ayer tab
  • Loading branch information
ShadowNinja authored and PilzAdam committed Apr 3, 2013
1 parent 6b8435c commit 2a0badf2d565ce4bebe2910c88795c0fe51a0341
Showing with 9 additions and 0 deletions.
  1. +9 −0 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;

0 comments on commit 2a0badf

Please sign in to comment.
You can’t perform that action at this time.