add errorcodes

This commit is contained in:
ZetaDesigns
2017-09-05 21:15:19 +02:00
parent dcac5401c1
commit a77b29da92
3 changed files with 8 additions and 3 deletions

View File

@@ -40,5 +40,5 @@ void draw_theme_install(int install_type);
void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode, int shuffle_theme_count); void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode, int shuffle_theme_count);
void draw_splash_install(int install_type); 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);
void throw_error(char* error);
#endif #endif

View File

@@ -37,6 +37,7 @@ enum Colors {
COLOR_WHITE = RGBA8(255, 255, 255, 255), COLOR_WHITE = RGBA8(255, 255, 255, 255),
COLOR_CURSOR = RGBA8(200, 200, 200, 255), COLOR_CURSOR = RGBA8(200, 200, 200, 255),
COLOR_BLACK = RGBA8(0, 0, 0, 255), COLOR_BLACK = RGBA8(0, 0, 0, 255),
COLOR_RED = RGBA8(200, 0, 0, 255)
}; };
void init_screens(void) void init_screens(void)
@@ -142,7 +143,11 @@ void draw_base_interface(void)
pp2d_draw_text(7, 219, 0.6, 0.6, COLOR_WHITE, VERSION); pp2d_draw_text(7, 219, 0.6, 0.6, COLOR_WHITE, VERSION);
pp2d_draw_on(GFX_TOP); pp2d_draw_on(GFX_TOP);
} }
void throw_error(char* error) {
draw_base_interface();
pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_WHITE, error);
pp2d_end_draw();
}
void draw_theme_install(int install_type) void draw_theme_install(int install_type)
{ {
draw_base_interface(); draw_base_interface();

View File

@@ -122,7 +122,7 @@ int main(void)
} }
else if (kDown & KEY_L) else if (kDown & KEY_L)
{ {
splash_mode = !splash_mode; throw_error("TEST");
} else if (kDown & KEY_R) } else if (kDown & KEY_R)
{ {
if (splash_mode || preview_mode) { if (splash_mode || preview_mode) {