Add splash uninstall screen
This commit is contained in:
@@ -35,9 +35,11 @@
|
|||||||
|
|
||||||
#define THEMES_PATH "/Themes/"
|
#define THEMES_PATH "/Themes/"
|
||||||
#define SPLASHES_PATH "/Splashes/"
|
#define SPLASHES_PATH "/Splashes/"
|
||||||
|
|
||||||
#define SINGLE_INSTALL 0
|
#define SINGLE_INSTALL 0
|
||||||
#define SHUFFLE_INSTALL 1
|
#define SHUFFLE_INSTALL 1
|
||||||
#define BGM_INSTALL 2
|
#define BGM_INSTALL 2
|
||||||
|
#define UNINSTALL 3
|
||||||
|
|
||||||
static const int THEMES_PER_SCREEN = 4;
|
static const int THEMES_PER_SCREEN = 4;
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ void exit_screens(void);
|
|||||||
|
|
||||||
void draw_theme_install(int install_type);
|
void draw_theme_install(int install_type);
|
||||||
void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode);
|
void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode);
|
||||||
void draw_splash_install(void);
|
void draw_splash_install(int install_type);
|
||||||
void draw_splash_interface(Splash_s *splashes_list, int splash_count, int selected_splash, bool preview_mode);
|
void draw_splash_interface(Splash_s *splashes_list, int splash_count, int selected_splash, bool preview_mode);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -209,10 +209,20 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t
|
|||||||
pp2d_end_draw();
|
pp2d_end_draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_splash_install(void)
|
void draw_splash_install(int install_type)
|
||||||
{
|
{
|
||||||
draw_base_interface();
|
draw_base_interface();
|
||||||
|
switch (install_type)
|
||||||
|
{
|
||||||
|
case SINGLE_INSTALL:
|
||||||
pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a splash...");
|
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();
|
pp2d_end_draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ int main(void)
|
|||||||
else if (kDown & KEY_X)
|
else if (kDown & KEY_X)
|
||||||
{
|
{
|
||||||
if (splash_mode) {
|
if (splash_mode) {
|
||||||
|
draw_splash_install(UNINSTALL);
|
||||||
splash_delete();
|
splash_delete();
|
||||||
} else {
|
} else {
|
||||||
draw_theme_install(BGM_INSTALL);
|
draw_theme_install(BGM_INSTALL);
|
||||||
@@ -135,7 +136,7 @@ int main(void)
|
|||||||
{
|
{
|
||||||
if (splash_mode)
|
if (splash_mode)
|
||||||
{
|
{
|
||||||
draw_splash_install();
|
draw_splash_install(SINGLE_INSTALL);
|
||||||
splash_install(*current_splash);
|
splash_install(*current_splash);
|
||||||
svcSleepThread(5e8);
|
svcSleepThread(5e8);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user