From d7825bca1b3e0ed21c766da3b86c69f1da98917f Mon Sep 17 00:00:00 2001 From: DS Date: Tue, 31 Mar 2020 19:34:42 +0200 Subject: 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.) --- src/gui/guiFormSpecMenu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/guiFormSpecMenu.h') 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> m_tooltip_rects; std::vector> m_scrollbars; std::vector>> m_dropdowns; + std::vector m_clickthrough_elements; GUIInventoryList::ItemSpec *m_selected_item = nullptr; u16 m_selected_amount = 0; -- cgit v1.2.3