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
This commit is contained in:
@@ -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
|
partial input or to cancel; "Who are you?" prompt was willing to name
|
||||||
a character "^["; have the popup version of getlin() fake the usual
|
a character "^["; have the popup version of getlin() fake the usual
|
||||||
ESC handling, but player has to type <escape><return> for that to work
|
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
|
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
|
"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
|
Qt: searching a text window for something that wasn't found and then searching
|
||||||
|
|||||||
@@ -1238,16 +1238,16 @@ menu_display_page(nhmenu *menu, WINDOW * win, int page_num, char *selectors)
|
|||||||
start_col += 2;
|
start_col += 2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
color = NO_COLOR;
|
color = NONE;
|
||||||
menu_color = iflags.use_menu_color
|
menu_color = iflags.use_menu_color
|
||||||
&& get_menu_coloring(menu_item_ptr->str, &color, &attr);
|
&& get_menu_coloring(menu_item_ptr->str, &color, &attr);
|
||||||
if (menu_color) {
|
if (menu_color) {
|
||||||
attr = curses_convert_attr(attr);
|
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);
|
curses_menu_color_attr(win, color, attr, ON);
|
||||||
} else {
|
} else {
|
||||||
attr = menu_item_ptr->attr;
|
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);
|
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);
|
free(tmpstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (color != NO_COLOR || attr != A_NORMAL) {
|
if (color != NONE || attr != A_NORMAL) {
|
||||||
if (menu_color)
|
if (menu_color)
|
||||||
curses_menu_color_attr(win, color, attr, OFF);
|
curses_menu_color_attr(win, color, attr, OFF);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user