mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Mainmenu: Fix error after ESC in dialog windows (#16130)
The error was caused by fd857374
, where 'MenuQuit' was processed after 'try_quit'.
This commit fixes the error by moving the special 'MenuQuit' handling to Lua.
This commit is contained in:
@@ -166,6 +166,10 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
core.button_handler = function(fields)
|
||||
if fields["try_quit"] and not fields["key_enter"] then
|
||||
core.event_handler("MenuQuit")
|
||||
return
|
||||
end
|
||||
if fields["btn_reconnect_yes"] then
|
||||
gamedata.reconnect_requested = false
|
||||
gamedata.errormessage = nil
|
||||
|
@@ -4053,7 +4053,6 @@ void GUIFormSpecMenu::tryClose()
|
||||
quitMenu();
|
||||
} else {
|
||||
acceptInput(quit_mode_try);
|
||||
m_text_dst->gotText(L"MenuQuit");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user