options help

Update the 'optmenu' data file to describe the simple options menu
(new paragraph containing just a one sentence) as well as the full
options menu (still several paragraphs).  Visible by choosing '?' in
the full options menu or the 'how to set options' choice in the main
help menu.

Add a line to the simple options menu about how to get the full
options menu.  Only shown if you type '?' to toggle on "show help";
taken away again if you use '?' to toggle back to "hide help".
This commit is contained in:
PatR
2023-08-31 14:58:51 -07:00
parent bc93ee5d04
commit 67513c96bb
2 changed files with 25 additions and 13 deletions

View File

@@ -1,12 +1,16 @@
How dynamically setting options works:
The options menu shows the current value for all options and lets
you pick ones that you'd like to change. Picking them doesn't make
any immediate changes though. That will take place once you close
the menu. For most of NetHack's interfaces, closing the menu is
done by pressing the <enter> key or <return> key; others might
require clicking on [ok]. Pressing the <escape> key or clicking
on [cancel] will close the menu and discard any pending changes.
The simple options menu shows a relatively small subset of options
and operates on each choice you make immediately, then is put back
up to allow further changes.
The full options menu shows the current value for all options and
lets you pick ones that you'd like to change. Picking them doesn't
make any changes though. That will take place once you close the
menu. For most of NetHack's interfaces, closing the menu is done
by pressing the <enter> key or <return> key; others might require
clicking on [ok]. Pressing the <escape> key or clicking on [cancel]
will close the menu and discard any pending changes.
The options menu is too long to fit on one screen. Some interfaces
paginate menus; use the '>' key to advance a page or '<' to back

View File

@@ -8605,20 +8605,28 @@ doset_simple_menu(void)
tmpwin = create_nhwindow(NHW_MENU);
start_menu(tmpwin, MENU_BEHAVE_STANDARD);
/* when showing 'help', also describe how to run full doset() */
if (gs.simple_options_help) {
/* we could look up whether #optionsfull has been bound to a key
and show that, or whether #reqmenu and #options are both still
bound to keys and show those, but if meta keys are involved
the player might not know how to type them; keep this simple */
Strcpy(buf, "Use command '#optionsfull'"
" to get the complete options list.");
any = cg.zeroany;
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
0, buf, MENU_ITEMFLAGS_NONE);
}
any = cg.zeroany;
any.a_int = -2 + 1;
add_menu(tmpwin, &nul_glyphinfo, &any, '?', 0, ATR_NONE, 0,
gs.simple_options_help ? "hide help" : "show help",
MENU_ITEMFLAGS_NONE);
any = cg.zeroany;
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
0, "", MENU_ITEMFLAGS_NONE);
for (section = OptS_General; section < OptS_Advanced; section++) {
any = cg.zeroany;
if (section != OptS_General)
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
0, "", MENU_ITEMFLAGS_NONE);
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
0, "", MENU_ITEMFLAGS_NONE);
Sprintf(buf, " %-30s ", OptS_type[section]);
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0,
iflags.menu_headings, 0,