'menu_headings' option

If the value is "no color&none" report it as "no-color&none" in 'm O'
and for #saveoptions.

Allow "OPTIONS=menu_headings" without any color or attribute value to
mean "no-color&inverse" as it once did before the player could choose
which attribute or color was supported, and matching the default used
when 'menu_headings' hasn't been specified at all.

Accept "OPTIONS=!menu_headings", meaning "no-color&none".

Explicitly reject "OPTIONS=!menu_headings:anything".  It was rejecting
that due to blanket rejection of negated option, but reporting "can't
both have a value and be negated" whether there was any value present
or not.

For preselected menu entries when interactively choosing a new value
via the submenu of 'm O', use the current color and attribute rather
than NO_COLOR and ATR_NONE.
This commit is contained in:
PatR
2023-11-14 21:33:09 -08:00
parent 830168f26e
commit fc52f0ef42
4 changed files with 45 additions and 33 deletions

View File

@@ -2086,8 +2086,8 @@ extern int add_autopickup_exception(const char *);
extern void free_autopickup_exceptions(void);
extern void set_playmode(void);
extern int sym_val(const char *);
extern int query_color(const char *);
extern int query_attr(const char *);
extern int query_color(const char *, int);
extern int query_attr(const char *, int);
extern boolean query_color_attr(color_attr *, const char *);
extern const char *clr2colorname(int);
extern int match_str2clr(char *);

View File

@@ -399,7 +399,7 @@ static int optfn_##a(int, int, boolean, char *, char *);
NHOPTC(menu_first_page, Advanced, 4, opt_in, set_in_config,
No, Yes, No, No, NoAlias, "jump to the first page in a menu")
NHOPTC(menu_headings, Advanced, 4, opt_in, set_in_game,
No, Yes, No, Yes, NoAlias, "display style for menu headings")
Yes, Yes, No, Yes, NoAlias, "display style for menu headings")
NHOPTC(menu_invert_all, Advanced, 4, opt_in, set_in_config,
No, Yes, No, No, NoAlias, "invert all items in a menu")
NHOPTC(menu_invert_page, Advanced, 4, opt_in, set_in_config,