1
0
Fork 0
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:
SmallJoker 2025-05-18 20:41:42 +02:00 committed by GitHub
parent 554dd5ddf4
commit 56ecf6d332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -4053,7 +4053,6 @@ void GUIFormSpecMenu::tryClose()
quitMenu();
} else {
acceptInput(quit_mode_try);
m_text_dst->gotText(L"MenuQuit");
}
}