diff options
author | EvidenceB <49488517+EvidenceBKidscode@users.noreply.github.com> | 2020-08-23 22:50:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-23 22:50:14 +0200 |
commit | 287f3fb2e3317bb6bd6d8608f1aa051c601aeca4 (patch) | |
tree | ab8379bb9007e151a6b5ab1bb481e310e20a7ed0 /src/gui/guiFormSpecMenu.cpp | |
parent | 3c2890692bb4c292023a8260cf9ce70f82b2e780 (diff) | |
download | hax-minetest-server-287f3fb2e3317bb6bd6d8608f1aa051c601aeca4.tar.gz hax-minetest-server-287f3fb2e3317bb6bd6d8608f1aa051c601aeca4.zip |
Avoid drawing clipped out formspec elements (#10095)
Diffstat (limited to '')
-rw-r--r-- | src/gui/guiFormSpecMenu.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 76441c645..7e3ad3b15 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -3483,10 +3483,14 @@ void GUIFormSpecMenu::drawMenu() e->setVisible(true); /* - Call base class - (This is where all the drawing happens.) + This is where all the drawing happens. */ - gui::IGUIElement::draw(); + core::list<IGUIElement*>::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + if ((*it)->isNotClipped() || + AbsoluteClippingRect.isRectCollided( + (*it)->getAbsolutePosition())) + (*it)->draw(); for (gui::IGUIElement *e : m_clickthrough_elements) e->setVisible(false); |