aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu
diff options
context:
space:
mode:
authorROllerozxa <temporaryemail4meh+github@gmail.com>2022-02-12 20:24:20 +0100
committerGitHub <noreply@github.com>2022-02-12 20:24:20 +0100
commit258ae994915e1b9fc5b3a72627886f2ce4334902 (patch)
tree13a8bfe00adf2247fd5e2801dd763c02e17593c2 /builtin/mainmenu
parent10cf2f3eddb9106a87721e36f0dd284ec041c4d8 (diff)
downloadminetest-258ae994915e1b9fc5b3a72627886f2ce4334902.tar.gz
minetest-258ae994915e1b9fc5b3a72627886f2ce4334902.tar.bz2
minetest-258ae994915e1b9fc5b3a72627886f2ce4334902.zip
Apply texture pack main menu textures immediately (#12018)
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r--builtin/mainmenu/tab_content.lua21
1 files changed, 12 insertions, 9 deletions
diff --git a/builtin/mainmenu/tab_content.lua b/builtin/mainmenu/tab_content.lua
index fb7f121f8..dd11570e9 100644
--- a/builtin/mainmenu/tab_content.lua
+++ b/builtin/mainmenu/tab_content.lua
@@ -154,6 +154,9 @@ local function handle_doubleclick(pkg)
core.settings:set("texture_path", pkg.path)
end
packages = nil
+
+ mm_game_theme.init()
+ mm_game_theme.reset()
end
end
@@ -197,17 +200,17 @@ local function handle_buttons(tabview, fields, tabname, tabdata)
return true
end
- if fields.btn_mod_mgr_use_txp then
- local txp = packages:get_list()[tabdata.selected_pkg]
- core.settings:set("texture_path", txp.path)
- packages = nil
- return true
- end
-
+ if fields.btn_mod_mgr_use_txp or fields.btn_mod_mgr_disable_txp then
+ local txp_path = ""
+ if fields.btn_mod_mgr_use_txp then
+ txp_path = packages:get_list()[tabdata.selected_pkg].path
+ end
- if fields.btn_mod_mgr_disable_txp then
- core.settings:set("texture_path", "")
+ core.settings:set("texture_path", txp_path)
packages = nil
+
+ mm_game_theme.init()
+ mm_game_theme.reset()
return true
end