From 3f501f9c905f24dcb80be2b4dfb8fbadad9c260b Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Thu, 23 May 2013 20:07:48 -0400 Subject: Add support for custom main menu active/inactive, message text and background colors. Fill in default values for the purple skin in uicolors.txt. --- source/nds/draw.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source/nds/draw.c') diff --git a/source/nds/draw.c b/source/nds/draw.c index 793b6ca..9a96e43 100644 --- a/source/nds/draw.c +++ b/source/nds/draw.c @@ -106,8 +106,12 @@ struct gui_iconlist gui_icon_list[]= { /* 34 */ {"sbutto", 76, 16, NULL} }; +u16 COLOR_BG = COLOR16( 0, 0, 0); u16 COLOR_INACTIVE_ITEM = COLOR16( 0, 0, 0); u16 COLOR_ACTIVE_ITEM = COLOR16(31, 31, 31); +u16 COLOR_MSSG = COLOR16( 0, 0, 0); +u16 COLOR_INACTIVE_MAIN = COLOR16(31, 31, 31); +u16 COLOR_ACTIVE_MAIN = COLOR16(31, 31, 31); /* @@ -624,6 +628,7 @@ void draw_hscroll_over(u32 index) /* * Drawing dialog */ +/* void draw_dialog(void* screen_addr, u32 sx, u32 sy, u32 ex, u32 ey) { drawboxfill(screen_addr, sx + 5, sy + 5, ex + 5, ey + 5, COLOR_DIALOG_SHADOW); @@ -650,6 +655,7 @@ void draw_dialog(void* screen_addr, u32 sx, u32 sy, u32 ex, u32 ey) drawboxfill(screen_addr, sx, sy, ex, ey, COLOR_DIALOG); } +*/ /* * Draw yes or no dialog @@ -1116,10 +1122,18 @@ int color_init() { *colon = '\0'; u16* color = NULL; - if (strcasecmp(current_line, "ActiveItem") == 0) + if (strcasecmp(current_line, "Background") == 0) + color = &COLOR_BG; + else if (strcasecmp(current_line, "ActiveItem") == 0) color = &COLOR_ACTIVE_ITEM; else if (strcasecmp(current_line, "InactiveItem") == 0) color = &COLOR_INACTIVE_ITEM; + else if (strcasecmp(current_line, "MessageText") == 0) + color = &COLOR_MSSG; + else if (strcasecmp(current_line, "ActiveMain") == 0) + color = &COLOR_ACTIVE_MAIN; + else if (strcasecmp(current_line, "InactiveMain") == 0) + color = &COLOR_INACTIVE_MAIN; if (color != NULL) { -- cgit v1.2.3