mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +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.
This commit is contained in:
parent
07fe8d4481
commit
a8af0c0ca4
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user