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:
12
src/role.c
12
src/role.c
@@ -1811,7 +1811,7 @@ role_menu_extra(int which, winid where, boolean preselect)
|
||||
char buf[BUFSZ];
|
||||
const char *what = 0, *constrainer = 0, *forcedvalue = 0;
|
||||
int f = 0, r, c, gend, a, i, allowmask;
|
||||
int clr = 0;
|
||||
int clr = NO_COLOR;
|
||||
|
||||
r = flags.initrole;
|
||||
c = flags.initrace;
|
||||
@@ -2192,7 +2192,7 @@ genl_player_setup(int screenheight)
|
||||
boolean getconfirmation, picksomething;
|
||||
winid win = WIN_ERR;
|
||||
menu_item *selected = 0;
|
||||
int clr = 0;
|
||||
int clr = NO_COLOR;
|
||||
char pick4u = 'n';
|
||||
int result = 0; /* assume failure (player chooses to 'quit') */
|
||||
|
||||
@@ -2837,7 +2837,7 @@ setup_rolemenu(
|
||||
int i;
|
||||
boolean role_ok;
|
||||
char thisch, lastch = '\0', rolenamebuf[50];
|
||||
int clr = 0;
|
||||
int clr = NO_COLOR;
|
||||
|
||||
any = cg.zeroany; /* zero out all bits */
|
||||
for (i = 0; roles[i].name.m; i++) {
|
||||
@@ -2887,7 +2887,7 @@ setup_racemenu(
|
||||
boolean race_ok;
|
||||
int i;
|
||||
char this_ch;
|
||||
int clr = 0;
|
||||
int clr = NO_COLOR;
|
||||
|
||||
any = cg.zeroany;
|
||||
for (i = 0; races[i].noun; i++) {
|
||||
@@ -2925,7 +2925,7 @@ setup_gendmenu(
|
||||
boolean gend_ok;
|
||||
int i;
|
||||
char this_ch;
|
||||
int clr = 0;
|
||||
int clr = NO_COLOR;
|
||||
|
||||
any = cg.zeroany;
|
||||
for (i = 0; i < ROLE_GENDERS; i++) {
|
||||
@@ -2961,7 +2961,7 @@ setup_algnmenu(
|
||||
boolean algn_ok;
|
||||
int i;
|
||||
char this_ch;
|
||||
int clr = 0;
|
||||
int clr = NO_COLOR;
|
||||
|
||||
any = cg.zeroany;
|
||||
for (i = 0; i < ROLE_ALIGNS; i++) {
|
||||
|
||||
Reference in New Issue
Block a user