#include "utility.h"
#include "modalMenu.h"
+class ITextureSource;
+
void drawInventoryItem(video::IVideoDriver *driver,
gui::IGUIFont *font,
InventoryItem *item, core::rect<s32> rect,
- const core::rect<s32> *clip);
+ const core::rect<s32> *clip,
+ ITextureSource *tsrc);
class GUIInventoryMenu : public GUIModalMenu
{
v2s32 pos;
v2s32 geom;
};
+
+ // See .cpp for format
+ static v2s16 makeDrawSpecArrayFromString(
+ core::array<GUIInventoryMenu::DrawSpec> &draw_spec,
+ const std::string &data,
+ const std::string ¤t_name);
GUIInventoryMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
v2s16 menu_size,
InventoryContext *c,
- InventoryManager *invmgr
+ InventoryManager *invmgr,
+ ITextureSource *tsrc
);
~GUIInventoryMenu();
void regenerateGui(v2u32 screensize);
ItemSpec getItemAtPos(v2s32 p) const;
- void drawList(const ListDrawSpec &s);
+ void drawList(const ListDrawSpec &s, ITextureSource *tsrc);
void drawMenu();
bool OnEvent(const SEvent& event);
InventoryContext *m_c;
InventoryManager *m_invmgr;
+ ITextureSource *m_tsrc;
core::array<DrawSpec> m_init_draw_spec;
core::array<ListDrawSpec> m_draw_spec;