#include <guiInventoryList.h>
|
| 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) |
|
virtual void | draw () override |
|
virtual bool | OnEvent (const SEvent &event) override |
|
const InventoryLocation & | getInventoryloc () const |
|
const std::string & | getListname () const |
|
void | setSlotBGColors (const video::SColor &slotbg_n, const video::SColor &slotbg_h) |
|
void | setSlotBorders (bool slotborder, const video::SColor &slotbordercolor) |
|
const v2s32 | getSlotSize () const noexcept |
|
s32 | getItemIndexAtPos (v2s32 p) const |
|
◆ GUIInventoryList()
GUIInventoryList::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 ) |
◆ draw()
void GUIInventoryList::draw |
( |
| ) |
|
|
overridevirtual |
References GUIFormSpecMenu::addHoveredItemTooltip(), GUIFormSpecMenu::doTooltipAppendItemname(), drawItemStack(), InventoryLocation::dump(), ItemStack::empty(), GUIFormSpecMenu::getClient(), ItemStack::getDescription(), InventoryManager::getInventory(), InventoryList::getItem(), RenderingEngine::getLastPointerType(), Inventory::getList(), GUIFormSpecMenu::getSelectedAmount(), GUIFormSpecMenu::getSelectedItem(), InventoryList::getSize(), GUIInventoryList::ItemSpec::i, GUIInventoryList::ItemSpec::inventoryloc, IT_ROT_HOVERED, IT_ROT_NONE, IT_ROT_SELECTED, GUIInventoryList::ItemSpec::listname, m_already_warned, m_font, m_fs_menu, m_geom, m_hovered_i, m_inventoryloc, m_invmgr, m_listname, m_options, m_slot_size, m_slot_spacing, m_start_item_i, ItemStack::name, p(), GUIInventoryList::Options::slotbg_h, GUIInventoryList::Options::slotbg_n, GUIInventoryList::Options::slotborder, GUIInventoryList::Options::slotbordercolor, ItemStack::takeItem(), Touch, and warningstream.
◆ getInventoryloc()
◆ getItemIndexAtPos()
s32 GUIInventoryList::getItemIndexAtPos |
( |
v2s32 | p | ) |
const |
References InventoryManager::getInventory(), Inventory::getList(), InventoryList::getSize(), m_geom, m_inventoryloc, m_invmgr, m_listname, m_slot_size, m_slot_spacing, m_start_item_i, and p().
Referenced by OnEvent().
◆ getListname()
const std::string & GUIInventoryList::getListname |
( |
| ) |
const |
|
inline |
◆ getSlotSize()
const v2s32 GUIInventoryList::getSlotSize |
( |
| ) |
const |
|
inlinenoexcept |
◆ OnEvent()
bool GUIInventoryList::OnEvent |
( |
const SEvent & | event | ) |
|
|
overridevirtual |
◆ setSlotBGColors()
void GUIInventoryList::setSlotBGColors |
( |
const video::SColor & | slotbg_n, |
|
|
const video::SColor & | slotbg_h ) |
|
inline |
◆ setSlotBorders()
void GUIInventoryList::setSlotBorders |
( |
bool | slotborder, |
|
|
const video::SColor & | slotbordercolor ) |
|
inline |
◆ m_already_warned
bool GUIInventoryList::m_already_warned |
|
private |
◆ m_font
gui::IGUIFont* GUIInventoryList::m_font |
|
private |
◆ m_fs_menu
◆ m_geom
const v2s32 GUIInventoryList::m_geom |
|
private |
◆ m_hovered_i
s32 GUIInventoryList::m_hovered_i |
|
private |
◆ m_inventoryloc
◆ m_invmgr
◆ m_listname
const std::string GUIInventoryList::m_listname |
|
private |
◆ m_options
Options GUIInventoryList::m_options |
|
private |
◆ m_slot_size
const v2s32 GUIInventoryList::m_slot_size |
|
private |
◆ m_slot_spacing
const v2f32 GUIInventoryList::m_slot_spacing |
|
private |
◆ m_start_item_i
const s32 GUIInventoryList::m_start_item_i |
|
private |
The documentation for this class was generated from the following files: