mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-23 14:24:18 -04:00
Friendlier UI in fileman
This commit is contained in:
parent
52b951f705
commit
59b310dff5
2 changed files with 5 additions and 5 deletions
|
@ -32,7 +32,7 @@ namespace ui {
|
||||||
void FileManBaseView::load_directory_contents(const std::filesystem::path& dir_path) {
|
void FileManBaseView::load_directory_contents(const std::filesystem::path& dir_path) {
|
||||||
current_path = dir_path;
|
current_path = dir_path;
|
||||||
|
|
||||||
text_current.set(dir_path.string().substr(0, 30 - 8));
|
text_current.set(dir_path.string().length()? dir_path.string().substr(0, 30 - 6):"(sd root)");
|
||||||
|
|
||||||
entry_list.clear();
|
entry_list.clear();
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ FileManagerView::FileManagerView(
|
||||||
|
|
||||||
button_delete.on_select = [this, &nav](Button&) {
|
button_delete.on_select = [this, &nav](Button&) {
|
||||||
// Use display_modal ?
|
// Use display_modal ?
|
||||||
nav.push<ModalMessageView>("Delete", "Delete " + entry_list[menu_view.highlighted_index()].entry_path.filename().string() + "\nAre you sure ?", YESNO,
|
nav.push<ModalMessageView>("Delete", "Delete " + entry_list[menu_view.highlighted_index()].entry_path.filename().string() + "\nAre you sure?", YESNO,
|
||||||
[this](bool choice) {
|
[this](bool choice) {
|
||||||
if (choice)
|
if (choice)
|
||||||
on_delete();
|
on_delete();
|
||||||
|
|
|
@ -85,10 +85,10 @@ protected:
|
||||||
void refresh_list();
|
void refresh_list();
|
||||||
|
|
||||||
Labels labels {
|
Labels labels {
|
||||||
{ { 0, 0 }, "Current:", Color::light_grey() }
|
{ { 0, 0 }, "Path:", Color::light_grey() }
|
||||||
};
|
};
|
||||||
Text text_current {
|
Text text_current {
|
||||||
{ 8 * 8, 0 * 8, 22 * 8, 16 },
|
{ 6 * 8, 0 * 8, 24 * 8, 16 },
|
||||||
"",
|
"",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue