Merge pull request #57 from astronautlevel2/zeta-patch
Make Errorcodes great again (well, sorta)
This commit is contained in:
@@ -41,6 +41,8 @@
|
|||||||
#define BGM_INSTALL 2
|
#define BGM_INSTALL 2
|
||||||
#define UNINSTALL 3
|
#define UNINSTALL 3
|
||||||
|
|
||||||
|
#define ERROR 0
|
||||||
|
#define WARNING 1
|
||||||
static const int THEMES_PER_SCREEN = 4;
|
static const int THEMES_PER_SCREEN = 4;
|
||||||
|
|
||||||
enum TextureID {
|
enum TextureID {
|
||||||
|
|||||||
@@ -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, int error_type);
|
||||||
#endif
|
#endif
|
||||||
@@ -37,6 +37,8 @@ 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),
|
||||||
|
COLOR_YELLOW = RGBA8(239, 220, 11, 255),
|
||||||
};
|
};
|
||||||
|
|
||||||
void init_screens(void)
|
void init_screens(void)
|
||||||
@@ -142,7 +144,18 @@ 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, int error_type) {
|
||||||
|
draw_base_interface();
|
||||||
|
switch (error_type) {
|
||||||
|
case ERROR:
|
||||||
|
pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_RED, error);
|
||||||
|
break;
|
||||||
|
case WARNING:
|
||||||
|
pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_YELLOW, error);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pp2d_end_draw();
|
||||||
|
}
|
||||||
void draw_theme_install(int install_type)
|
void draw_theme_install(int install_type)
|
||||||
{
|
{
|
||||||
draw_base_interface();
|
draw_base_interface();
|
||||||
|
|||||||
Reference in New Issue
Block a user