mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
GUI inventory list: Do not render clipped slots (#15764)
This commit is contained in:
parent
6def21b5e3
commit
fd8d04ff76
1 changed files with 4 additions and 0 deletions
|
@ -85,6 +85,10 @@ void GUIInventoryList::draw()
|
|||
v2s32 p((i % m_geom.X) * m_slot_spacing.X,
|
||||
(i / m_geom.X) * m_slot_spacing.Y);
|
||||
core::rect<s32> rect = imgrect + base_pos + p;
|
||||
|
||||
if (!getAbsoluteClippingRect().isRectCollided(rect))
|
||||
continue; // out of (parent) clip area
|
||||
|
||||
const ItemStack &orig_item = ilist->getItem(item_i);
|
||||
ItemStack item = orig_item;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue