summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/textures.lua
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-04-18 15:39:15 +0200
committersapier <Sapier at GMX dot net>2014-05-16 22:57:14 +0200
commitc3984569c06dc3c2890516e95adc38dcab9ec89a (patch)
treec3b134eb11cadad6b70ff866e4c9e1167b509235 /builtin/mainmenu/textures.lua
parent34d872628d5099ae520dd92433e211f561aaf611 (diff)
downloadminetest-c3984569c06dc3c2890516e95adc38dcab9ec89a.tar.gz
minetest-c3984569c06dc3c2890516e95adc38dcab9ec89a.tar.bz2
minetest-c3984569c06dc3c2890516e95adc38dcab9ec89a.zip
Add formspec toolkit and refactor mainmenu to use it
Fix crash on using cursor keys in client menu without selected server Add support for non fixed size tabviews
Diffstat (limited to 'builtin/mainmenu/textures.lua')
-rw-r--r--builtin/mainmenu/textures.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/builtin/mainmenu/textures.lua b/builtin/mainmenu/textures.lua
index 998fc2199..cec12235c 100644
--- a/builtin/mainmenu/textures.lua
+++ b/builtin/mainmenu/textures.lua
@@ -20,11 +20,11 @@ mm_texture = {}
--------------------------------------------------------------------------------
function mm_texture.init()
- mm_texture.defaulttexturedir = engine.get_texturepath() .. DIR_DELIM .. "base" ..
+ mm_texture.defaulttexturedir = core.get_texturepath() .. DIR_DELIM .. "base" ..
DIR_DELIM .. "pack" .. DIR_DELIM
mm_texture.basetexturedir = mm_texture.defaulttexturedir
- mm_texture.texturepack = engine.setting_get("texture_path")
+ mm_texture.texturepack = core.setting_get("texture_path")
mm_texture.gameid = nil
end
@@ -55,14 +55,14 @@ function mm_texture.reset()
mm_texture.clear("header")
mm_texture.clear("footer")
- engine.set_clouds(false)
+ core.set_clouds(false)
mm_texture.set_generic("footer")
mm_texture.set_generic("header")
if not have_bg and
- engine.setting_getbool("enable_clouds") then
- engine.set_clouds(true)
+ core.setting_getbool("menu_clouds") then
+ core.set_clouds(true)
end
end
@@ -72,7 +72,7 @@ function mm_texture.update_game(gamedetails)
return
end
- local have_bg = false
+ local have_bg = false
local have_overlay = mm_texture.set_game("overlay",gamedetails)
if not have_overlay then
@@ -81,11 +81,11 @@ function mm_texture.update_game(gamedetails)
mm_texture.clear("header")
mm_texture.clear("footer")
- engine.set_clouds(false)
+ core.set_clouds(false)
if not have_bg and
- engine.setting_getbool("enable_clouds") then
- engine.set_clouds(true)
+ core.setting_getbool("menu_clouds") then
+ core.set_clouds(true)
end
mm_texture.set_game("footer",gamedetails)
@@ -96,24 +96,24 @@ end
--------------------------------------------------------------------------------
function mm_texture.clear(identifier)
- engine.set_background(identifier,"")
+ core.set_background(identifier,"")
end
--------------------------------------------------------------------------------
function mm_texture.set_generic(identifier)
--try texture pack first
if mm_texture.texturepack ~= nil then
- local path = mm_texture.texturepack .. DIR_DELIM .."menu_" ..
+ local path = mm_texture.texturepack .. DIR_DELIM .."menu_" ..
identifier .. ".png"
- if engine.set_background(identifier,path) then
+ if core.set_background(identifier,path) then
return true
end
end
if mm_texture.defaulttexturedir ~= nil then
- local path = mm_texture.defaulttexturedir .. DIR_DELIM .."menu_" ..
+ local path = mm_texture.defaulttexturedir .. DIR_DELIM .."menu_" ..
identifier .. ".png"
- if engine.set_background(identifier,path) then
+ if core.set_background(identifier,path) then
return true
end
end
@@ -131,14 +131,14 @@ function mm_texture.set_game(identifier,gamedetails)
if mm_texture.texturepack ~= nil then
local path = mm_texture.texturepack .. DIR_DELIM ..
gamedetails.id .. "_menu_" .. identifier .. ".png"
- if engine.set_background(identifier,path) then
+ if core.set_background(identifier,path) then
return true
end
end
- local path = gamedetails.path .. DIR_DELIM .."menu" ..
+ local path = gamedetails.path .. DIR_DELIM .."menu" ..
DIR_DELIM .. identifier .. ".png"
- if engine.set_background(identifier,path) then
+ if core.set_background(identifier,path) then
return true
end