-/* NetHack 3.6 options.c $NHDT-Date: 1543972192 2018/12/05 01:09:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.335 $ */
+/* NetHack 3.6 options.c $NHDT-Date: 1544174413 2018/12/07 09:20:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.339 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
int NDECL((*othr_count_func));
} othropt[] = {
{ "autopickup exceptions", SET_IN_GAME, OPT_OTHER_APEXC, count_apes },
- { "menucolors", SET_IN_GAME, OPT_OTHER_MENUCOLOR, count_menucolors },
+ { "menu colors", SET_IN_GAME, OPT_OTHER_MENUCOLOR, count_menucolors },
{ "message types", SET_IN_GAME, OPT_OTHER_MSGTYPE, msgtype_count },
#ifdef STATUS_HILITES
{ "status hilite rules", SET_IN_GAME, OPT_OTHER_STATHILITE,
}
#endif
} else if (opt_indx == OPT_OTHER_MENUCOLOR) {
- (void) special_handling("menucolors", setinitial,
+ (void) special_handling("menu_colors", setinitial,
fromfile);
} else if (opt_indx == OPT_OTHER_MSGTYPE) {
(void) special_handling("msgtype", setinitial, fromfile);
if (pick_cnt >= 0)
goto msgtypes_again;
}
- } else if (!strcmp("menucolors", optname)) {
+ } else if (!strcmp("menu_colors", optname)) {
int opt_idx, nmc, mcclr, mcattr;
char mcbuf[BUFSZ] = DUMMY;
nmc = count_menucolors();
opt_idx = handle_add_list_remove("menucolor", nmc);
if (opt_idx == 3) { /* done */
+ menucolors_done:
+ if (nmc > 0 && !iflags.use_menu_color)
+ pline(
+ "To have menu colors become active, toggle 'menucolors' option to True.");
return TRUE;
} else if (opt_idx == 0) { /* add new */
getlin("What new menucolor pattern?", mcbuf);
if (*mcbuf == '\033')
- return TRUE;
+ goto menucolors_done;
if (*mcbuf
&& test_regex_pattern(mcbuf, (const char *)0)
&& (mcclr = query_color((char *) 0)) != -1