8#include <IGUIElement.h>
9#include <IGUIEnvironment.h>
23 const std::string &a_listname,
53 video::SColor
slotbg_n = video::SColor(255, 128, 128, 128);
54 video::SColor
slotbg_h = video::SColor(255, 192, 192, 192);
58 gui::IGUIElement *parent,
60 const core::rect<s32> &rectangle,
63 const std::string &listname,
65 const s32 start_item_i,
66 const v2s32 &slot_size,
67 const v2f32 &slot_spacing,
74 bool OnEvent(
const SEvent &event)
override;
76 bool isPointInside(
const core::position2d<s32> &point)
const override;
90 void setSlotBGColors(
const video::SColor &slotbg_n,
const video::SColor &slotbg_h)
99 m_options.slotbordercolor = slotbordercolor;
void setSlotBGColors(const video::SColor &slotbg_n, const video::SColor &slotbg_h)
Definition guiInventoryList.h:90
bool isPointInside(const core::position2d< s32 > &point) const override
Definition guiInventoryList.cpp:243
const s32 m_start_item_i
Definition guiInventoryList.h:118
void setHoveredIndex(s32 item_i)
Definition guiInventoryList.cpp:248
s32 m_hovered_i
Definition guiInventoryList.h:134
const std::string & getListname() const
Definition guiInventoryList.h:85
s32 getItemIndexAtPos(v2s32 p) const
Definition guiInventoryList.cpp:253
const v2s32 getSlotSize() const noexcept
Definition guiInventoryList.h:102
GUIFormSpecMenu * m_fs_menu
Definition guiInventoryList.h:126
const v2f32 m_slot_spacing
Definition guiInventoryList.h:123
GUIInventoryList(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle, InventoryManager *invmgr, const InventoryLocation &inventoryloc, const std::string &listname, const v2s32 &geom, const s32 start_item_i, const v2s32 &slot_size, const v2f32 &slot_spacing, GUIFormSpecMenu *fs_menu, const Options &options, gui::IGUIFont *font)
Definition guiInventoryList.cpp:12
const InventoryLocation & getInventoryloc() const
Definition guiInventoryList.h:80
void setSlotBorders(bool slotborder, const video::SColor &slotbordercolor)
Definition guiInventoryList.h:96
bool OnEvent(const SEvent &event) override
Definition guiInventoryList.cpp:226
Options m_options
Definition guiInventoryList.h:128
bool m_already_warned
Definition guiInventoryList.h:137
const v2s32 m_geom
Definition guiInventoryList.h:116
const InventoryLocation m_inventoryloc
Definition guiInventoryList.h:112
gui::IGUIFont * m_font
Definition guiInventoryList.h:131
void draw() override
Definition guiInventoryList.cpp:42
InventoryManager * m_invmgr
Definition guiInventoryList.h:111
const v2s32 m_slot_size
Definition guiInventoryList.h:121
const std::string m_listname
Definition guiInventoryList.h:113
Definition inventorymanager.h:96
core::vector2d< f32 > v2f32
Definition irr_v2d.h:15
core::vector2d< s32 > v2s32
Definition irr_v2d.h:13
v2s32 slotsize
Definition guiInventoryList.h:44
ItemSpec(const InventoryLocation &a_inventoryloc, const std::string &a_listname, s32 a_i, const v2s32 slotsize)
Definition guiInventoryList.h:22
bool isValid() const
Definition guiInventoryList.h:39
bool operator==(const ItemSpec &other) const
Definition guiInventoryList.h:33
InventoryLocation inventoryloc
Definition guiInventoryList.h:41
s32 i
Definition guiInventoryList.h:43
std::string listname
Definition guiInventoryList.h:42
Definition guiInventoryList.h:48
video::SColor slotbg_h
Definition guiInventoryList.h:54
bool slotborder
Definition guiInventoryList.h:50
video::SColor slotbordercolor
Definition guiInventoryList.h:51
video::SColor slotbg_n
Definition guiInventoryList.h:53
Definition inventorymanager.h:18
static std::string p(std::string path)
Definition test_filesys.cpp:66