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 /src/guiFormSpecMenu.h | |
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 'src/guiFormSpecMenu.h')
-rw-r--r-- | src/guiFormSpecMenu.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h index 73c21b72d..c244e458f 100644 --- a/src/guiFormSpecMenu.h +++ b/src/guiFormSpecMenu.h @@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., class IGameDef; class InventoryManager; +class ISimpleTextureSource; typedef enum { f_Button, @@ -176,7 +177,8 @@ public: gui::IGUIElement* parent, s32 id, IMenuManager *menumgr, InventoryManager *invmgr, - IGameDef *gamedef + IGameDef *gamedef, + ISimpleTextureSource *tsrc ); ~GUIFormSpecMenu(); @@ -245,6 +247,7 @@ protected: irr::IrrlichtDevice* m_device; InventoryManager *m_invmgr; IGameDef *m_gamedef; + ISimpleTextureSource *m_tsrc; std::string m_formspec_string; InventoryLocation m_current_inventory_location; @@ -302,8 +305,6 @@ private: bool key_escape; } fs_key_pendig; - std::vector<video::ITexture *> m_Textures; - fs_key_pendig current_keys_pending; // Determine whether listbox click was double click |