diff options
author | sfan5 <sfan5@live.de> | 2016-12-20 14:27:14 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-12-20 14:29:12 +0100 |
commit | bdf8f8549331270dc828289762c1de26d7e5e96e (patch) | |
tree | 779dd4d5f41e420476df35c6b387e0b1a89b5f65 /src | |
parent | 0f0502109eac44128e87906fff30b5d049392f1d (diff) | |
download | minetest-bdf8f8549331270dc828289762c1de26d7e5e96e.tar.gz minetest-bdf8f8549331270dc828289762c1de26d7e5e96e.tar.bz2 minetest-bdf8f8549331270dc828289762c1de26d7e5e96e.zip |
Limit drawing rect of selected item to viewport size (fixes #4341)
Diffstat (limited to 'src')
-rw-r--r-- | src/guiFormSpecMenu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<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); } |