Fix regression dirt texture not beeing default in non cloud menu

This commit is contained in:
sapier 2014-05-17 12:06:36 +02:00 committed by Nils Dagsson Moskopp
parent 5ad41abbdd
commit d8335372ca
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 24 additions and 4 deletions

View File

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