GUI inventory list: Do not render clipped slots (#15764)

This commit is contained in:
Lars Müller 2025-02-09 12:19:25 +01:00 committed by GitHub
parent 6def21b5e3
commit fd8d04ff76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;