diff options
author | Kahrl <kahrl@gmx.net> | 2013-08-20 22:38:14 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2013-09-11 00:08:56 +0200 |
commit | 3c4734d69a44aea133e5bd7df66a5dedb87785fb (patch) | |
tree | f3961c8855c0d864b672ae79857de9b993c3e95c /builtin/mainmenu.lua | |
parent | da9fe6485134ec81cc3628b1bc4847c3b2226c76 (diff) | |
download | minetest-3c4734d69a44aea133e5bd7df66a5dedb87785fb.tar.gz minetest-3c4734d69a44aea133e5bd7df66a5dedb87785fb.tar.bz2 minetest-3c4734d69a44aea133e5bd7df66a5dedb87785fb.zip |
Change mainmenu texture handling + small misc changes
Texture names must now be escaped in formspec elements image[],
background[], image_button[], image_button_exit[].
Instead of special-case handling of texture loading (and unloading
which was missing) in guiFormSpecMenu.cpp, use the newly created
ISimpleTextureSource interface which is a minimal subset of
ITextureSource. There is an implementation of this interface
used by GUIEngine (MenuTextureSource).
Fix an off-by-one bug in unescape_string; it caused requests for a
texture called "\0".
Diffstat (limited to 'builtin/mainmenu.lua')
-rw-r--r-- | builtin/mainmenu.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua index 787a5e280..5a1b6e929 100644 --- a/builtin/mainmenu.lua +++ b/builtin/mainmenu.lua @@ -1047,16 +1047,17 @@ function tabbuilder.tab_texture_packs() return retval .. menu.render_texture_pack_list(list) .. ";" .. index .. "]" .. - "image[0.65,0.25;4.0,3.7;"..(screenfile or no_screenshot).."]".. + "image[0.65,0.25;4.0,3.7;"..engine.formspec_escape(screenfile or no_screenshot).."]".. "textarea[1.0,3.25;3.7,1.5;;"..engine.formspec_escape(infotext or "")..";]" end -------------------------------------------------------------------------------- function tabbuilder.tab_credits() + local logofile = menu.defaulttexturedir .. "logo.png" return "vertlabel[0,-0.5;CREDITS]" .. "label[0.5,3;Minetest " .. engine.get_version() .. "]" .. "label[0.5,3.3;http://minetest.net]" .. - "image[0.5,1;" .. menu.defaulttexturedir .. "logo.png]" .. + "image[0.5,1;" .. engine.formspec_escape(logofile) .. "]" .. "textlist[3.5,-0.25;8.5,5.8;list_credits;" .. "#FFFF00" .. fgettext("Core Developers") .."," .. "Perttu Ahola (celeron55) <celeron55@gmail.com>,".. |