mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix GUI element click-through by changing visibility (#9534)
This adds a vector that holds pointers to elements that should only be visible while being drawn. In the guifsmenu's draw func, all elements in this vector are made visible and invisible again. Apart from there, they are always invisible. (Well they are still visible before the first drawn, does this matter? If yes, it could be fixed easily with some lines of code everywhere.)
This commit is contained in:
parent
9953145a4e
commit
d7825bca1b
2 changed files with 30 additions and 1 deletions
|
@ -307,6 +307,7 @@ protected:
|
|||
std::vector<std::pair<gui::IGUIElement *, TooltipSpec>> m_tooltip_rects;
|
||||
std::vector<std::pair<FieldSpec, GUIScrollBar *>> m_scrollbars;
|
||||
std::vector<std::pair<FieldSpec, std::vector<std::string>>> m_dropdowns;
|
||||
std::vector<gui::IGUIElement *> m_clickthrough_elements;
|
||||
|
||||
GUIInventoryList::ItemSpec *m_selected_item = nullptr;
|
||||
u16 m_selected_amount = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue