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

master
sfan5 2016-12-20 14:27:14 +01:00
parent 0f0502109e
commit bdf8f85493
1 changed files with 1 additions and 0 deletions

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