1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

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

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;