summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2020-01-04 15:45:22 +0100
committersfan5 <sfan5@live.de>2020-01-04 15:45:22 +0100
commit7c0e0c34ecb66e044f59cbab03a4c12fc7838e97 (patch)
treef52aa1934cf54646fc5370f5a360e50073b9537e /src
parentf9c7e46a347576c9327aaa0d9b6a5b4cd07c26e2 (diff)
downloadminetest-7c0e0c34ecb66e044f59cbab03a4c12fc7838e97.tar.gz
minetest-7c0e0c34ecb66e044f59cbab03a4c12fc7838e97.tar.bz2
minetest-7c0e0c34ecb66e044f59cbab03a4c12fc7838e97.zip
Formspec: Fix clicking on tooltip-obstructed elements (#9266)
Diffstat (limited to 'src')
-rw-r--r--src/gui/guiFormSpecMenu.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp
index e6cd50d86..f3951f30d 100644
--- a/src/gui/guiFormSpecMenu.cpp
+++ b/src/gui/guiFormSpecMenu.cpp
@@ -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);