Commits

a1ex committed 36f5865

Menu customization tweaks

Comments (0)

Files changed (2)

     }
 }
 
+static int get_customize_color()
+{
+    if (CUSTOMIZE_MODE_HIDING) return junkie_mode ? COLOR_ORANGE : COLOR_RED;
+    else if (CUSTOMIZE_MODE_MYMENU) return COLOR_GREEN1;
+    return 0;
+}
+
 static void
 entry_print(
     int x,
     if (customize_mode)
     {
         // reserve space for icons
-        if (entry != &customize_menu[0] && !is_menu_active(MY_MENU_NAME) && !in_submenu)
+        if (entry != &customize_menu[0] && !(is_menu_active(MY_MENU_NAME) && !in_submenu))
             xc = x_end - 70;
         else
             xc = x_end;
             bfnt_draw_char(ICON_ML_MYMENU, xc, y-4, COLOR_GREEN1, COLOR_BLACK);
         
         // hidden marker
-        if (entry->hidden)
-            batsu(xc+37, y+2, COLOR_RED);
+        if (HAS_CURRENT_HIDDEN_FLAG(entry))
+            batsu(xc+37, y+2, junkie_mode ? COLOR_ORANGE : COLOR_RED);
     }
 
     // selection bar
         int color_left = COLOR_GRAY45;
         int color_right = MENU_BAR_COLOR;
         if (junkie_mode && !in_submenu) color_left = color_right = COLOR_BLACK;
-        if (CUSTOMIZE_MODE_HIDING) color_left = COLOR_RED;
-        else if (CUSTOMIZE_MODE_MYMENU) color_left = COLOR_GREEN1;
-        if (customize_mode) color_right = COLOR_GRAY45;
+        if (customize_mode) { color_left = get_customize_color(); color_right = COLOR_GRAY40; }
 
         selection_bar_backend(color_left, COLOR_BLACK, x-5, y, xc-x+5, 31);
         selection_bar_backend(color_right, COLOR_BLACK, xc, y, x_end-xc, 31);
     if (customize_mode)
     {
         bmp_printf(
-            FONT(FONT_MED, CUSTOMIZE_MODE_HIDING ? COLOR_RED : COLOR_GREEN1, MENU_BG_COLOR_HEADER_FOOTER),
+            FONT(FONT_MED, get_customize_color(), MENU_BG_COLOR_HEADER_FOOTER),
              10,  MENU_HELP_Y_POS_2, 
                 CUSTOMIZE_MODE_HIDING ? "Press SET to show/hide items you don't use.                 " :
                 CUSTOMIZE_MODE_MYMENU ? "Press SET to choose your favorite items for MyMenu.         " : ""
         
         // hidden marker
         if (entry->jhidden)
-            bmp_printf(SHADOW_FONT(FONT(FONT_LARGE, COLOR_RED, COLOR_BLACK)), x+w-20, y, "x");
+            bmp_printf(SHADOW_FONT(FONT(FONT_LARGE, COLOR_ORANGE, COLOR_BLACK)), x+w-20, y, "x");
     }
 }
 
     int fgu = COLOR_GRAY50;
     int fgs = COLOR_WHITE;
 
+    if (customize_mode) fgs = get_customize_color();
+
     bmp_fill(bgu, orig_x, y, 720, 42);
     bmp_fill(fgu, orig_x, y+42, 720, 1);
     
 
 #define HAS_HIDDEN_FLAG(entry) ((entry)->hidden)
 #define HAS_JHIDDEN_FLAG(entry) ((entry)->jhidden)
-#define IS_VISIBLE(entry) ( \
-    (!junkie_mode && !HAS_HIDDEN_FLAG(entry)) || \
-    (junkie_mode && !HAS_JHIDDEN_FLAG(entry)) || \
-    customize_mode) 
+
+#define HAS_CURRENT_HIDDEN_FLAG(entry) ( \
+    (!junkie_mode && HAS_HIDDEN_FLAG(entry)) || \
+    (junkie_mode && HAS_JHIDDEN_FLAG(entry)) )
+
+#define IS_VISIBLE(entry) ( !HAS_CURRENT_HIDDEN_FLAG(entry) || customize_mode)
+
 
 #define MENU_INT(entry) ((entry)->priv ? *(int*)(entry)->priv : 0)
 #define CURRENT_VALUE (MENU_INT(entry))