From bdf8f8549331270dc828289762c1de26d7e5e96e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 20 Dec 2016 14:27:14 +0100 Subject: [PATCH] Limit drawing rect of selected item to viewport size (fixes #4341) --- src/guiFormSpecMenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 981a8edba..bfc7a9b79 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -2362,6 +2362,7 @@ void GUIFormSpecMenu::drawSelectedItem() core::rect imgrect(0,0,imgsize.X,imgsize.Y); core::rect rect = imgrect + (m_pointer - imgrect.getCenter()); + rect.constrainTo(driver->getViewPort()); drawItemStack(driver, m_font, stack, rect, NULL, m_gamedef, IT_ROT_DRAGGED); } -- 2.25.1