1
0
Mirror von https://github.com/luanti-org/luanti.git synchronisiert 2025-12-16 12:05:26 +01:00

Close buttonbars when hiding TouchScreenGUI (#14630)

To open the inventory or the pause menu, you first need to open the buttonbar
containing the respective button. Before this commit, the buttonbar is still
open after closing the menu, so you have to tap twice before you can continue
playing. After this commit, the buttonbar is already closed after closing the
menu, so you only have to tap once before you can continue playing.
Dieser Commit ist enthalten in:
grorp
2024-05-10 18:54:22 +02:00
committet von GitHub
Ursprung 07fe8d4481
Commit a8af0c0ca4

Datei anzeigen

@@ -857,8 +857,10 @@ void TouchScreenGUI::setVisible(bool visible)
if (!visible) {
while (!m_pointer_pos.empty())
handleReleaseEvent(m_pointer_pos.begin()->first);
for (AutoHideButtonBar &bar : m_buttonbars)
for (AutoHideButtonBar &bar : m_buttonbars) {
bar.deactivate();
bar.hide();
}
} else {
for (AutoHideButtonBar &bar : m_buttonbars)
bar.show();