Skip to content

Commit

Permalink
Added Back using D button
Browse files Browse the repository at this point in the history
  • Loading branch information
frostmorn committed Mar 22, 2024
1 parent ea8c7be commit 97b0683
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions firmware/keira/src/apps/launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void LauncherApp::fileBrowserMenu(String path) {
}
closedir(currentDir);
menu.addItem("<< Назад", 0, 0);

menu.addActivationButton(lilka::Button::D);
while (1) {
while (!menu.isFinished()) {
menu.update();
Expand All @@ -231,10 +231,17 @@ void LauncherApp::fileBrowserMenu(String path) {
}
int16_t index = menu.getCursor();
if (index == fileCount) break;
if (entries[index].type == lilka::EntryType::ENT_DIRECTORY) {
fileBrowserMenu(fPath + entries[index].name);
} else {
selectFile(fPath + entries[index].name);
String fullFilePath = fPath + entries[index].name;
if (menu.getButton() == lilka::Button::A) {
// Open
if (entries[index].type == lilka::EntryType::ENT_DIRECTORY) {
fileBrowserMenu(fullFilePath);
} else {
selectFile(fullFilePath);
}
} else if (menu.getButton() == lilka::Button::D) {
// Back
break;
}
}
}
Expand Down

0 comments on commit 97b0683

Please sign in to comment.