mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00: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:
parent
554dd5ddf4
commit
56ecf6d332
2 changed files with 4 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue