Skip to content

Commit 2a0badf

Browse files
ShadowNinjaPilzAdam
authored andcommittedApr 3, 2013
Check if the address field is empty when hitting enter on the multiplayer tab
1 parent 6b8435c commit 2a0badf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/guiMainMenu.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,15 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
12071207
switch(event.GUIEvent.Caller->getID())
12081208
{
12091209
case GUI_ID_ADDRESS_INPUT: case GUI_ID_PORT_INPUT: case GUI_ID_NAME_INPUT: case 264:
1210+
MainMenuData cur;
1211+
readInput(&cur);
1212+
if (getTab() == TAB_MULTIPLAYER && cur.address == L"")
1213+
{
1214+
(new GUIMessageMenu(env, parent, -1, menumgr,
1215+
wgettext("Address required."))
1216+
)->drop();
1217+
return true;
1218+
}
12101219
acceptInput();
12111220
quitMenu();
12121221
return true;

0 commit comments

Comments
 (0)
Please sign in to comment.