Skip to content

Commit

Permalink
Formspec: Fix clicking on tooltip-obstructed elements (#9266)
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour authored and sfan5 committed Jan 4, 2020
1 parent f9c7e46 commit 7c0e0c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/guiFormSpecMenu.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 7c0e0c3

Please sign in to comment.