]> git.lizzy.rs Git - minetest.git/commitdiff
Formspec: Fix clicking on tooltip-obstructed elements (#9266)
authorDS <vorunbekannt75@web.de>
Sat, 4 Jan 2020 14:45:22 +0000 (15:45 +0100)
committersfan5 <sfan5@live.de>
Sat, 4 Jan 2020 14:45:22 +0000 (15:45 +0100)
src/gui/guiFormSpecMenu.cpp

index e6cd50d86bb578941509f59a4f4bc95c4d778b16..f3951f30d943e36d66d4e3f6c4ad40cf0654f1e6 100644 (file)
@@ -447,6 +447,9 @@ void GUIFormSpecMenu::parseList(parserData* data, const std::string &element)
                gui::IGUIElement *e = new gui::IGUIElement(EGUIET_ELEMENT, Environment,
                                this, spec.fid, rect);
 
+               // the element the list is bound to should not block mouse-clicks
+               e->setVisible(false);
+
                m_inventorylists.emplace_back(loc, listname, e, geom, start_i,
                                data->real_coordinates);
                m_fields.push_back(spec);
@@ -2243,6 +2246,9 @@ void GUIFormSpecMenu::parseTooltip(parserData* data, const std::string &element)
                gui::IGUIElement *e = new gui::IGUIElement(EGUIET_ELEMENT, Environment,
                                this, fieldspec.fid, rect);
 
+               // the element the rect tooltip is bound to should not block mouse-clicks
+               e->setVisible(false);
+
                m_fields.push_back(fieldspec);
                m_tooltip_rects.emplace_back(e, spec);