1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-21 23:28:48 -05:00

Limit drawing rect of selected item to viewport size (fixes #4341)

This commit is contained in:
sfan5 2016-12-20 14:27:14 +01:00
parent 0f0502109e
commit bdf8f85493

View File

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