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:
@@ -682,7 +682,7 @@ void
|
||||
curses_add_menu(winid wid, const glyph_info *glyphinfo,
|
||||
const ANY_P *identifier,
|
||||
char accelerator, char group_accel, int attr,
|
||||
int clr UNUSED, const char *str, unsigned itemflags)
|
||||
int clr, const char *str, unsigned itemflags)
|
||||
{
|
||||
int curses_attr;
|
||||
|
||||
@@ -694,14 +694,14 @@ curses_add_menu(winid wid, const glyph_info *glyphinfo,
|
||||
/* persistent inventory window; nothing is selectable;
|
||||
omit glyphinfo because perm_invent is to the side of
|
||||
the map so usually cramped for horizontal space */
|
||||
curs_add_invt(inv_update, accelerator, curses_attr, str);
|
||||
curs_add_invt(inv_update, accelerator, curses_attr, clr, str);
|
||||
inv_update++;
|
||||
return;
|
||||
}
|
||||
|
||||
curses_add_nhmenu_item(wid, glyphinfo, identifier,
|
||||
accelerator, group_accel,
|
||||
curses_attr, str, itemflags);
|
||||
curses_attr, clr, str, itemflags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user