Skip to content

Commit

Permalink
Check if the address field is empty when hitting enter on the multipl…
Browse files Browse the repository at this point in the history
…ayer tab
  • Loading branch information
ShadowNinja authored and PilzAdam committed Apr 3, 2013
1 parent 6b8435c commit 2a0badf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/guiMainMenu.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 2a0badf

Please sign in to comment.