main menu: add background

wsc-master-rebase
cora 2020-11-18 05:04:20 +01:00 committed by Schmappie Eldress
parent e2321f82b7
commit 16b41bbd3e
2 changed files with 19 additions and 13 deletions

View File

@ -47,22 +47,28 @@ end
function mm_texture.reset()
mm_texture.gameid = nil
local have_bg = false
local have_overlay = mm_texture.set_generic("overlay")
--local have_overlay = mm_texture.set_generic("overlay")
core.set_clouds(false)
mm_texture.clear("header")
mm_texture.clear("footer")
core.set_clouds(false)
mm_texture.set_generic("footer")
mm_texture.set_generic("header")
local minimalpath = defaulttexturedir .. "menu_bg.png"
core.set_background("background", minimalpath, false, 128)
if true then return end
if not have_overlay then
have_bg = mm_texture.set_generic("background")
end
mm_texture.clear("header")
mm_texture.clear("footer")
core.set_clouds(false)
mm_texture.set_generic("footer")
mm_texture.set_generic("header")
if not have_bg then
if core.settings:get_bool("menu_clouds") then
core.set_clouds(true)
core.set_clouds(false)
else
mm_texture.set_dirt_bg()
end
@ -172,12 +178,12 @@ function mm_texture.set_game(identifier, gamedetails)
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
--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 universal fallback texture in textures/base/pack
local minimalpath = defaulttexturedir .. "menu_bg.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 305 KiB