]> granicus.if.org Git - nethack/commitdiff
Fix menu headings using default text color
authorPatric Mueller <bhaak@gmx.net>
Thu, 1 Apr 2021 19:33:12 +0000 (21:33 +0200)
committerPatric Mueller <bhaak@gmx.net>
Thu, 1 Apr 2021 19:49:56 +0000 (21:49 +0200)
Rendering menu headings used the NetHack internal NO_COLOR macro which mapped
to dark gray instead of the default text color.

Fixes #480

doc/fixes37.0
win/curses/cursdial.c

index 221502d7f412a9c0bc23424a2ef1732c9d8fb1e5..e8778a9808b2fcf787ce48a52a8f8b39be836595 100644 (file)
@@ -580,6 +580,7 @@ curses: line input that doesn't take place on the bottom line of the message
        partial input or to cancel; "Who are you?" prompt was willing to name
        a character "^["; have the popup version of getlin() fake the usual
        ESC handling, but player has to type <escape><return> for that to work
+curses: menu headings didn't use default text color
 Qt: at Xp levels above 20 with 'showexp' On, the combined status field
        "Level:NN/nnnnnnnn" was too big and truncated by a char at each end
 Qt: searching a text window for something that wasn't found and then searching
index a1f7179637b900a64966e459082be184a355affa..a2cebc24c17f645dd5e7618b00fe721f765d5c07 100644 (file)
@@ -1238,16 +1238,16 @@ menu_display_page(nhmenu *menu, WINDOW * win, int page_num, char *selectors)
             start_col += 2;
         }
 #endif
-        color = NO_COLOR;
+        color = NONE;
         menu_color = iflags.use_menu_color
                      && get_menu_coloring(menu_item_ptr->str, &color, &attr);
         if (menu_color) {
             attr = curses_convert_attr(attr);
-            if (color != NO_COLOR || attr != A_NORMAL)
+            if (color != NONE || attr != A_NORMAL)
                 curses_menu_color_attr(win, color, attr, ON);
         } else {
             attr = menu_item_ptr->attr;
-            if (color != NO_COLOR || attr != A_NORMAL)
+            if (color != NONE || attr != A_NORMAL)
                 curses_toggle_color_attr(win, color, attr, ON);
         }
 
@@ -1261,7 +1261,7 @@ menu_display_page(nhmenu *menu, WINDOW * win, int page_num, char *selectors)
                 free(tmpstr);
             }
         }
-        if (color != NO_COLOR || attr != A_NORMAL) {
+        if (color != NONE || attr != A_NORMAL) {
             if (menu_color)
                 curses_menu_color_attr(win, color, attr, OFF);
             else