Add optionsfull extended command

This is the previous, full options list. Adding it as
an extended command, so users can do

BIND=O:optionsfull

to go back to the old behaviour.
This commit is contained in:
Pasi Kallinen
2022-08-03 19:18:41 +03:00
parent adf451e421
commit bfd262ebe8
5 changed files with 16 additions and 8 deletions

View File

@@ -302,7 +302,6 @@ static void free_one_menu_coloring(int);
static int count_menucolors(void);
static boolean parse_role_opts(int, boolean, const char *,
char *, char **);
static int doset_simple(void);
static unsigned int longest_option_name(int, int);
static void doset_add_menu(winid, const char *, int, int);
static int handle_add_list_remove(const char *, int);
@@ -7721,7 +7720,7 @@ longest_option_name(int startpass, int endpass)
}
/* #options - the user friendly version */
static int
int
doset_simple(void)
{
static boolean made_fmtstr = FALSE;
@@ -7734,6 +7733,9 @@ doset_simple(void)
boolean *bool_p;
const char *name;
if (iflags.menu_requested)
return doset();
if (!made_fmtstr) {
Sprintf(fmtstr_doset, "%%s%%-%us [%%s]",
longest_option_name(set_gameview, set_in_game));
@@ -7855,7 +7857,7 @@ rerun:
return ECMD_OK;
}
/* the #options command */
/* the #optionsfull command */
int
doset(void) /* changing options via menu by Per Liboriussen */
{
@@ -7872,9 +7874,6 @@ doset(void) /* changing options via menu by Per Liboriussen */
gavehelp = FALSE, skiphelp = !iflags.cmdassist;
int clr = 0;
if (!iflags.menu_requested)
return doset_simple();
/* if we offer '?' as a choice and it is the only thing chosen,
we'll end up coming back here after showing the explanatory text */
rerun: