]> git.lizzy.rs Git - minetest.git/blobdiff - src/guiFormSpecMenu.h
Grow dirt_with_snow instead of dirt_with_grass if snow is above it
[minetest.git] / src / guiFormSpecMenu.h
index f0a5988e95ce100fcf785a7fdda9ec16edb68b2e..17b202b187e5ab30c2bd39ae49283236e86ce172 100644 (file)
@@ -1,6 +1,6 @@
 /*
-Minetest-c55
-Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -133,6 +133,7 @@ class GUIFormSpecMenu : public GUIModalMenu
                        send = false;
                        is_button = false;
                        is_exit = false;
+                       tooltip="";
                }
                std::wstring fname;
                std::wstring flabel;
@@ -141,10 +142,12 @@ class GUIFormSpecMenu : public GUIModalMenu
                bool send;
                bool is_button;
                bool is_exit;
+               core::rect<s32> rect;
+               std::string tooltip;
        };
 
 public:
-       GUIFormSpecMenu(gui::IGUIEnvironment* env,
+       GUIFormSpecMenu(irr::IrrlichtDevice* dev,
                        gui::IGUIElement* parent, s32 id,
                        IMenuManager *menumgr,
                        InventoryManager *invmgr,
@@ -197,6 +200,7 @@ class GUIFormSpecMenu : public GUIModalMenu
        v2s32 spacing;
        v2s32 imgsize;
        
+       irr::IrrlichtDevice* m_device;
        InventoryManager *m_invmgr;
        IGameDef *m_gamedef;
 
@@ -205,13 +209,21 @@ class GUIFormSpecMenu : public GUIModalMenu
        IFormSource *m_form_src;
        TextDest *m_text_dst;
 
-       core::array<ListDrawSpec> m_inventorylists;
-       core::array<ImageDrawSpec> m_images;
-       core::array<FieldSpec> m_fields;
+       std::vector<ListDrawSpec> m_inventorylists;
+       std::vector<ImageDrawSpec> m_backgrounds;
+       std::vector<ImageDrawSpec> m_images;
+       std::vector<ImageDrawSpec> m_itemimages;
+       std::vector<FieldSpec> m_fields;
 
        ItemSpec *m_selected_item;
        u32 m_selected_amount;
        bool m_selected_dragging;
+       
+       // WARNING: BLACK MAGIC
+       // Used to guess and keep up with some special things the server can do.
+       // If name is "", no guess exists.
+       ItemStack m_selected_content_guess;
+       InventoryLocation m_selected_content_guess_inventory;
 
        v2s32 m_pointer;
        gui::IGUIStaticText *m_tooltip_element;