mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
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".
This commit is contained in:
@@ -227,7 +227,7 @@ function modstore.getmodlist(list)
|
||||
end
|
||||
|
||||
retval = retval .. "image[0,".. screenshot_ypos .. ";3,2;" ..
|
||||
list.data[i].texturename .. "]"
|
||||
engine.formspec_escape(list.data[i].texturename) .. "]"
|
||||
|
||||
--title + author
|
||||
retval = retval .."label[2.75," .. screenshot_ypos .. ";" ..
|
||||
|
Reference in New Issue
Block a user