mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Clean up and improve mainmenu theme / game theme code (#13885)
This commit is contained in:
parent
62eb6cfed0
commit
b1dec37adb
10 changed files with 96 additions and 80 deletions
|
@ -41,8 +41,6 @@ function check_reinstall_mtg()
|
|||
return
|
||||
end
|
||||
|
||||
mm_game_theme.reset()
|
||||
|
||||
local maintab = ui.find_by_name("maintab")
|
||||
|
||||
local dlg = create_reinstall_mtg_dlg()
|
||||
|
@ -96,7 +94,10 @@ local function buttonhandler(this, fields)
|
|||
end
|
||||
|
||||
local function eventhandler(event)
|
||||
if event == "MenuQuit" then
|
||||
if event == "DialogShow" then
|
||||
mm_game_theme.set_engine()
|
||||
return true
|
||||
elseif event == "MenuQuit" then
|
||||
-- Don't allow closing the dialog with ESC, but still allow exiting
|
||||
-- Minetest.
|
||||
core.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue