From 3c4734d69a44aea133e5bd7df66a5dedb87785fb Mon Sep 17 00:00:00 2001 From: Kahrl Date: Tue, 20 Aug 2013 22:38:14 +0200 Subject: 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". --- src/game.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 5d8365781..f313ae28f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1720,7 +1720,7 @@ void the_game( GUIFormSpecMenu *menu = new GUIFormSpecMenu(device, guiroot, -1, &g_menumgr, - &client, gamedef); + &client, gamedef, tsrc); InventoryLocation inventoryloc; inventoryloc.setCurrentPlayer(); @@ -2259,7 +2259,7 @@ void the_game( GUIFormSpecMenu *menu = new GUIFormSpecMenu(device, guiroot, -1, &g_menumgr, - &client, gamedef); + &client, gamedef, tsrc); menu->setFormSource(current_formspec); menu->setTextDest(current_textdest); menu->drop(); @@ -2755,7 +2755,7 @@ void the_game( GUIFormSpecMenu *menu = new GUIFormSpecMenu(device, guiroot, -1, &g_menumgr, - &client, gamedef); + &client, gamedef, tsrc); menu->setFormSpec(meta->getString("formspec"), inventoryloc); menu->setFormSource(new NodeMetadataFormSource( -- cgit v1.2.3