Add splash uninstall screen
This commit is contained in:
@@ -209,10 +209,20 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t
|
||||
pp2d_end_draw();
|
||||
}
|
||||
|
||||
void draw_splash_install(void)
|
||||
void draw_splash_install(int install_type)
|
||||
{
|
||||
draw_base_interface();
|
||||
pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a splash...");
|
||||
switch (install_type)
|
||||
{
|
||||
case SINGLE_INSTALL:
|
||||
pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a splash...");
|
||||
break;
|
||||
case UNINSTALL:
|
||||
pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Uninstalling a splash...");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
pp2d_end_draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -124,18 +124,19 @@ int main(void)
|
||||
// Actions
|
||||
else if (kDown & KEY_X)
|
||||
{
|
||||
if (splash_mode) {
|
||||
splash_delete();
|
||||
} else {
|
||||
draw_theme_install(BGM_INSTALL);
|
||||
bgm_install(*current_theme);
|
||||
}
|
||||
if (splash_mode) {
|
||||
draw_splash_install(UNINSTALL);
|
||||
splash_delete();
|
||||
} else {
|
||||
draw_theme_install(BGM_INSTALL);
|
||||
bgm_install(*current_theme);
|
||||
}
|
||||
}
|
||||
else if (kDown & KEY_A)
|
||||
{
|
||||
if (splash_mode)
|
||||
{
|
||||
draw_splash_install();
|
||||
draw_splash_install(SINGLE_INSTALL);
|
||||
splash_install(*current_splash);
|
||||
svcSleepThread(5e8);
|
||||
} else {
|
||||
|
||||
@@ -88,8 +88,8 @@ Result get_splashes(Splash_s** splashes_list, int *splash_count)
|
||||
}
|
||||
void splash_delete()
|
||||
{
|
||||
remove("/luma/splash.bin");
|
||||
remove("/luma/splashbottom.bin");
|
||||
remove("/luma/splash.bin");
|
||||
remove("/luma/splashbottom.bin");
|
||||
}
|
||||
void splash_install(Splash_s splash_to_install)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user