Adding splash deletion feature (#24)
* Adding splash deletion feature * Add Mention for deleting splashes
This commit is contained in:
@@ -37,5 +37,5 @@ typedef struct{
|
||||
|
||||
Result get_splashes(Splash_s** splashes_list, int *splash_count);
|
||||
void splash_install(Splash_s splash_to_install);
|
||||
|
||||
void splash_delete();
|
||||
#endif
|
||||
@@ -239,8 +239,8 @@ void draw_splash_interface(Splash_s *splashes_list, int splash_count, int select
|
||||
draw_base_interface();
|
||||
pp2d_draw_text_center(GFX_TOP, 4, 0.5, 0.5, COLOR_WHITE, "Splash mode");
|
||||
|
||||
pp2d_draw_wtext_center(GFX_TOP, 210, 0.7, 0.7, COLOR_WHITE, L"\uE000 Install Splash \uE004 Switch to Themes");
|
||||
|
||||
pp2d_draw_wtext_center(GFX_TOP, 180, 0.7, 0.7, COLOR_WHITE, L"\uE000 Install Splash \uE004 Switch to Themes");
|
||||
pp2d_draw_wtext_center(GFX_TOP, 210, 0.7, 0.7, COLOR_WHITE, L"\uE002 Delete current Splash");
|
||||
pp2d_draw_on(GFX_BOTTOM);
|
||||
for (int i = 0; i < splash_count; i++) {
|
||||
if (splash_count <= THEMES_PER_SCREEN)
|
||||
|
||||
@@ -132,9 +132,13 @@ int main(void)
|
||||
// Actions
|
||||
else if (kDown & KEY_X)
|
||||
{
|
||||
if (splash_mode) {
|
||||
splash_delete();
|
||||
} else {
|
||||
draw_theme_install(BGM_INSTALL);
|
||||
bgm_install(*current_theme);
|
||||
}
|
||||
}
|
||||
else if (kDown & KEY_A)
|
||||
{
|
||||
if (splash_mode)
|
||||
|
||||
@@ -86,7 +86,11 @@ Result get_splashes(Splash_s** splashes_list, int *splash_count)
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void splash_delete()
|
||||
{
|
||||
remove("/luma/splash.bin");
|
||||
remove("/luma/splashbottom.bin");
|
||||
}
|
||||
void splash_install(Splash_s splash_to_install)
|
||||
{
|
||||
char *screen_buf;
|
||||
|
||||
Reference in New Issue
Block a user