Skip to content

Commit

Permalink
GUI inventory list: Do not render clipped slots (#15764)
Browse files Browse the repository at this point in the history
  • Loading branch information
appgurueu authored Feb 9, 2025
1 parent 6def21b commit fd8d04f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/guiInventoryList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fd8d04f

Please sign in to comment.