More options menu in file picker stops callbacks from other elements

This commit is contained in:
Yousef Khadadeh 2026-04-28 21:35:09 +03:00
parent d9172f4848
commit 826efee7fb

View file

@ -492,9 +492,11 @@ void FileSelectScreen::title_bar() {
}
}, LayoutElement::Callbacks{
.onClick = [&](LayoutElement* l, const InputManager::MouseButtonCallbackArgs& m) {
if(!l->mouseHovering && m.down) {
moreOptionsMenu = MoreOptionsMenu::CLOSED;
main.g.gui.set_to_layout();
if(!l->mouseHovering && !m.down) {
gui.set_post_callback_func_high_priority([&] { // Cancel actions on other buttons
moreOptionsMenu = MoreOptionsMenu::CLOSED;
main.g.gui.set_to_layout();
});
}
}
});