forked from Mirrorlandia_minetest/minetest
Check if the address field is empty when hitting enter on the multiplayer tab
This commit is contained in:
parent
6b8435cf8c
commit
2a0badf2d5
@ -1207,6 +1207,15 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
|
|||||||
switch(event.GUIEvent.Caller->getID())
|
switch(event.GUIEvent.Caller->getID())
|
||||||
{
|
{
|
||||||
case GUI_ID_ADDRESS_INPUT: case GUI_ID_PORT_INPUT: case GUI_ID_NAME_INPUT: case 264:
|
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();
|
acceptInput();
|
||||||
quitMenu();
|
quitMenu();
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user