Move tool stuff to tool.{h,cpp}
[oweals/minetest.git] / src / guiInventoryMenu.h
index acddb5c24866b5f1c69d0277947042bc5486c3ff..5336cae8206a1ae9ffea543b66403fa01e37df10 100644 (file)
@@ -102,17 +102,27 @@ public:
                v2s32 pos;
                v2s32 geom;
        };
+       
+       // See .cpp for format
+       static v2s16 makeDrawSpecArrayFromString(
+                       core::array<GUIInventoryMenu::DrawSpec> &draw_spec,
+                       const std::string &data,
+                       const std::string &current_name);
 
        GUIInventoryMenu(gui::IGUIEnvironment* env,
                        gui::IGUIElement* parent, s32 id,
                        IMenuManager *menumgr,
                        v2s16 menu_size,
-                       core::array<DrawSpec> &init_draw_spec,
                        InventoryContext *c,
                        InventoryManager *invmgr
                        );
        ~GUIInventoryMenu();
 
+       void setDrawSpec(core::array<DrawSpec> &init_draw_spec)
+       {
+               m_init_draw_spec = init_draw_spec;
+       }
+
        void removeChildren();
        /*
                Remove and re-add (or reposition) stuff
@@ -125,7 +135,7 @@ public:
 
        bool OnEvent(const SEvent& event);
        
-private:
+protected:
        v2s32 getBasePos() const
        {
                return padding + AbsoluteRect.UpperLeftCorner;