diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-06-03 17:18:08 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-06-03 22:31:02 +0300 |
commit | 1709fd854a2d943de8cc48ee1e092dcb4315f9a6 (patch) | |
tree | f0dddbb5ecfffa0f4e2f82de020ae95edb8769f7 /src/guiInventoryMenu.h | |
parent | 7bf446f671541f38d6dc89d207ee6effd3564483 (diff) | |
download | minetest-1709fd854a2d943de8cc48ee1e092dcb4315f9a6.tar.gz minetest-1709fd854a2d943de8cc48ee1e092dcb4315f9a6.tar.bz2 minetest-1709fd854a2d943de8cc48ee1e092dcb4315f9a6.zip |
Implement image[<X>,<Y>;<W>,<H>;<texture name>] and allow floating-point values in formspec
Diffstat (limited to 'src/guiInventoryMenu.h')
-rw-r--r-- | src/guiInventoryMenu.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/guiInventoryMenu.h b/src/guiInventoryMenu.h index 4660ab2bf..beb6ef2e8 100644 --- a/src/guiInventoryMenu.h +++ b/src/guiInventoryMenu.h @@ -70,12 +70,12 @@ class GUIInventoryMenu : public GUIModalMenu } ListDrawSpec(const InventoryLocation &a_inventoryloc, const std::string &a_listname, - v2s32 a_pos, v2s32 a_geom) + v2s32 a_pos, v2s32 a_geom): + inventoryloc(a_inventoryloc), + listname(a_listname), + pos(a_pos), + geom(a_geom) { - inventoryloc = a_inventoryloc; - listname = a_listname; - pos = a_pos; - geom = a_geom; } InventoryLocation inventoryloc; @@ -83,6 +83,24 @@ class GUIInventoryMenu : public GUIModalMenu v2s32 pos; v2s32 geom; }; + + struct ImageDrawSpec + { + ImageDrawSpec() + { + } + ImageDrawSpec(const std::string &a_name, + v2s32 a_pos, v2s32 a_geom): + name(a_name), + pos(a_pos), + geom(a_geom) + { + } + std::string name; + v2s32 pos; + v2s32 geom; + }; + public: GUIInventoryMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, @@ -129,7 +147,9 @@ protected: std::string m_formspec_string; InventoryLocation m_current_inventory_location; - core::array<ListDrawSpec> m_draw_spec; + + core::array<ListDrawSpec> m_inventorylists; + core::array<ImageDrawSpec> m_images; ItemSpec *m_selected_item; u32 m_selected_amount; |