From: Patric Mueller Date: Thu, 1 Apr 2021 19:33:12 +0000 (+0200) Subject: Fix menu headings using default text color X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=495aaf33f6d2495bb9f0943e6599007c6b122c56;p=nethack Fix menu headings using default text color Rendering menu headings used the NetHack internal NO_COLOR macro which mapped to dark gray instead of the default text color. Fixes #480 --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 221502d7f..e8778a980 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 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 diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index a1f717963..a2cebc24c 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -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