Change menu_headings to accept color and attribute
Instead of just accepting an attribute, it's now possible to use a color, or both color and attribute, for example: OPTIONS=menu_headings:inverse OPTIONS=menu_headings:red OPTIONS=menu_headings:red&underline Default is still just inverse. This lets the player change the menu heading color without needing to use menu colors for them. Also makes it so the core uses NO_COLOR instead of 0, for all the menu lines which don't have any prefedefined color. Tested for tty, curses, x11, qt, and win32
This commit is contained in:
@@ -2639,7 +2639,7 @@ set_vanq_order(boolean for_vanq)
|
||||
char buf[BUFSZ];
|
||||
const char *desc;
|
||||
int i, n, choice,
|
||||
clr = 0;
|
||||
clr = NO_COLOR;
|
||||
|
||||
tmpwin = create_nhwindow(NHW_MENU);
|
||||
start_menu(tmpwin, MENU_BEHAVE_STANDARD);
|
||||
@@ -2760,7 +2760,7 @@ list_vanquished(char defquery, boolean ask)
|
||||
Strcpy(buf, def_monsyms[(int) mlet].explain);
|
||||
/* 'ask' implies final disclosure, where highlighting
|
||||
of various header lines is suppressed */
|
||||
putstr(klwin, ask ? ATR_NONE : iflags.menu_headings,
|
||||
putstr(klwin, ask ? ATR_NONE : iflags.menu_headings.attr,
|
||||
upstart(buf));
|
||||
prev_mlet = mlet;
|
||||
}
|
||||
@@ -2971,7 +2971,7 @@ list_genocided(char defquery, boolean ask)
|
||||
Strcpy(buf, def_monsyms[(int) mlet].explain);
|
||||
/* 'ask' implies final disclosure, where highlighting
|
||||
of various header lines is suppressed */
|
||||
putstr(klwin, ask ? ATR_NONE : iflags.menu_headings,
|
||||
putstr(klwin, ask ? ATR_NONE : iflags.menu_headings.attr,
|
||||
upstart(buf));
|
||||
prev_mlet = mlet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user