aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu/init.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-01-07 12:35:04 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-01-07 12:35:04 +0100
commitcca4254f7c502b3e75691c6a3087da7cfcd72e28 (patch)
treee71b47442e77e09ca17e2c9c121a455f9deeace2 /builtin/mainmenu/init.lua
parent4fedc3a31ee20813e4c81377b3bd2af05a26b858 (diff)
parent58a709096ef8ff17644cf201f25b1831d9506514 (diff)
downloaddragonfireclient-cca4254f7c502b3e75691c6a3087da7cfcd72e28.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'builtin/mainmenu/init.lua')
-rw-r--r--builtin/mainmenu/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua
index b7e867d2e..5c7e20932 100644
--- a/builtin/mainmenu/init.lua
+++ b/builtin/mainmenu/init.lua
@@ -19,6 +19,7 @@ mt_color_grey = "#AAAAAA"
mt_color_blue = "#6389FF"
mt_color_green = "#72FF63"
mt_color_dark_green = "#25C191"
+mt_color_orange = "#FF8800"
local menupath = core.get_mainmenu_path()
local basepath = core.get_builtin_path()
@@ -105,6 +106,16 @@ local function init_globals()
if last_tab and tv_main.current_tab ~= last_tab then
tv_main:set_tab(last_tab)
end
+
+ -- In case the folder of the last selected game has been deleted,
+ -- display "Minetest" as a header
+ if tv_main.current_tab == "local" then
+ local game = pkgmgr.find_by_gameid(core.settings:get("menu_last_game"))
+ if game == nil then
+ mm_texture.reset()
+ end
+ end
+
ui.set_default("maintab")
tv_main:show()