Ask for confirmation before deletion from SD (#113)

* added awful way to confirm deletion

* improve solution for asking for confirmation
based on throw_error

* fix COLOR_WHITE evaluating to -1 (outside the u32 range)

* add confirmation for splash deletion
This commit is contained in:
Dylan G
2017-12-10 23:55:55 +00:00
committed by GitHub
parent 6eabfc84ab
commit b59e5fc078
5 changed files with 80 additions and 17 deletions

View File

@@ -295,8 +295,11 @@ int main(void)
current_entry->in_shuffle = !current_entry->in_shuffle;
break;
case MODE_SPLASHES:
draw_install(INSTALL_SPLASH_DELETE);
splash_delete();
if(draw_confirm("Are you sure you would like to delete\nthe installed splash?", current_list, current_mode))
{
draw_install(INSTALL_SPLASH_DELETE);
splash_delete();
}
break;
default:
break;
@@ -316,9 +319,12 @@ int main(void)
}
else if(kDown & KEY_SELECT)
{
draw_install(INSTALL_ENTRY_DELETE);
delete_entry(*current_entry);
load_lists(lists);
if(draw_confirm("Are you sure you would like to delete this?", current_list, current_mode))
{
draw_install(INSTALL_ENTRY_DELETE);
delete_entry(*current_entry);
load_lists(lists);
}
}
// Movement in the UI