summaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2020-03-31 19:34:42 +0200
committerGitHub <noreply@github.com>2020-03-31 18:34:42 +0100
commitd7825bca1b3e0ed21c766da3b86c69f1da98917f (patch)
treeb025d3e344bb1ffa93e3cb8b02cb6e6f63379cd2 /src/gui/guiFormSpecMenu.h
parent9953145a4efe5d2487ec8f5edc76cf8e418b7b41 (diff)
downloadminetest-d7825bca1b3e0ed21c766da3b86c69f1da98917f.tar.gz
minetest-d7825bca1b3e0ed21c766da3b86c69f1da98917f.tar.bz2
minetest-d7825bca1b3e0ed21c766da3b86c69f1da98917f.zip
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.)
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r--src/gui/guiFormSpecMenu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h
index 184b26f3c..17bfef205 100644
--- a/src/gui/guiFormSpecMenu.h
+++ b/src/gui/guiFormSpecMenu.h
@@ -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;