mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01: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
Reference in a new issue