hotkey R2 in filebrowser for when pressed along with L2, select all files.

This commit is contained in:
ITotalJustice
2025-05-25 21:06:14 +01:00
parent 4f931d2991
commit 49abdc0590

View File

@@ -295,6 +295,8 @@ FsView::FsView(Menu* menu, const fs::FsPath& path, const FsEntry& entry, ViewSid
m_menu->ResetSelection();
}
// if both set, select all.
if (App::GetApp()->m_controller.GotHeld(Button::R2)) {
const auto set = m_selected_count != m_entries_current.size();
for (u32 i = 0; i < m_entries_current.size(); i++) {
@@ -308,18 +310,14 @@ FsView::FsView(Menu* menu, const fs::FsPath& path, const FsEntry& entry, ViewSid
}
}
}
}}),
std::make_pair(Button::R2, Action{[this](){
if (!m_menu->m_selected.Empty()) {
m_menu->ResetSelection();
}
} else {
GetEntry().selected ^= 1;
if (GetEntry().selected) {
m_selected_count++;
} else {
m_selected_count--;
}
}
}}),
std::make_pair(Button::A, Action{"Open"_i18n, [this](){
if (m_entries_current.empty()) {