Skip to content
Snippets Groups Projects
Commit 2a0badf2 authored by ShadowNinja's avatar ShadowNinja Committed by PilzAdam
Browse files

Check if the address field is empty when hitting enter on the multiplayer tab

parent 6b8435cf
Branches
Tags
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment