mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
GUIInventoryList: Keep item size while moving (#12896)
This commit is contained in:
parent
02c293ec63
commit
16266397ed
2 changed files with 15 additions and 5 deletions
|
@ -34,10 +34,12 @@ public:
|
|||
|
||||
ItemSpec(const InventoryLocation &a_inventoryloc,
|
||||
const std::string &a_listname,
|
||||
s32 a_i) :
|
||||
s32 a_i,
|
||||
const v2s32 slotsize) :
|
||||
inventoryloc(a_inventoryloc),
|
||||
listname(a_listname),
|
||||
i(a_i)
|
||||
i(a_i),
|
||||
slotsize(slotsize)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -46,6 +48,7 @@ public:
|
|||
InventoryLocation inventoryloc;
|
||||
std::string listname;
|
||||
s32 i = -1;
|
||||
v2s32 slotsize;
|
||||
};
|
||||
|
||||
// options for inventorylists that are setable with the lua api
|
||||
|
@ -99,6 +102,11 @@ public:
|
|||
m_options.slotbordercolor = slotbordercolor;
|
||||
}
|
||||
|
||||
const v2s32 getSlotSize() const noexcept
|
||||
{
|
||||
return m_slot_size;
|
||||
}
|
||||
|
||||
// returns -1 if not item is at pos p
|
||||
s32 getItemIndexAtPos(v2s32 p) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue