mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Limit drawing rect of selected item to viewport size (fixes #4341)
This commit is contained in:
parent
0f0502109e
commit
bdf8f85493
@ -2362,6 +2362,7 @@ void GUIFormSpecMenu::drawSelectedItem()
|
||||
|
||||
core::rect<s32> imgrect(0,0,imgsize.X,imgsize.Y);
|
||||
core::rect<s32> rect = imgrect + (m_pointer - imgrect.getCenter());
|
||||
rect.constrainTo(driver->getViewPort());
|
||||
drawItemStack(driver, m_font, stack, rect, NULL, m_gamedef, IT_ROT_DRAGGED);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user