mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 01:05:48 +01:00 
			
		
		
		
	Check if the address field is empty when hitting enter on the multiplayer tab
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user