summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-05-17 12:06:36 +0200
committersapier <Sapier at GMX dot net>2014-06-14 20:51:57 +0200
commit7b3602bab3a697a2729b057c5e8a354337482389 (patch)
tree5cc0ce970c724bdb984f6cdf9cf831b6b7c61631 /builtin
parent5b3bbde1efe61d2d515c9323b6d031621316100c (diff)
downloadminetest-7b3602bab3a697a2729b057c5e8a354337482389.tar.gz
minetest-7b3602bab3a697a2729b057c5e8a354337482389.tar.bz2
minetest-7b3602bab3a697a2729b057c5e8a354337482389.zip
Fix regression dirt texture not beeing default in non cloud menu
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mainmenu/textures.lua28
1 files changed, 24 insertions, 4 deletions
diff --git a/builtin/mainmenu/textures.lua b/builtin/mainmenu/textures.lua
index cec12235c..56992c0c5 100644
--- a/builtin/mainmenu/textures.lua
+++ b/builtin/mainmenu/textures.lua
@@ -60,9 +60,12 @@ function mm_texture.reset()
mm_texture.set_generic("footer")
mm_texture.set_generic("header")
- if not have_bg and
- core.setting_getbool("menu_clouds") then
+ if not have_bg then
+ if core.setting_getbool("menu_clouds") then
core.set_clouds(true)
+ else
+ mm_texture.set_dirt_bg()
+ end
end
end
@@ -83,9 +86,13 @@ function mm_texture.update_game(gamedetails)
mm_texture.clear("footer")
core.set_clouds(false)
- if not have_bg and
- core.setting_getbool("menu_clouds") then
+ if not have_bg then
+
+ if core.setting_getbool("menu_clouds") then
core.set_clouds(true)
+ else
+ mm_texture.set_dirt_bg()
+ end
end
mm_texture.set_game("footer",gamedetails)
@@ -144,3 +151,16 @@ function mm_texture.set_game(identifier,gamedetails)
return false
end
+
+function mm_texture.set_dirt_bg()
+ if mm_texture.texturepack ~= nil then
+ local path = mm_texture.texturepack .. DIR_DELIM .."default_dirt.png"
+ if core.set_background("background", path, true, 128) then
+ return true
+ end
+ end
+
+ --use base pack
+ local minimalpath = defaulttexturedir .. "dirt_bg.png"
+ core.set_background("background", minimalpath, true, 128)
+end