TTY: Add menu_overlay option
This was a request from a blind player. It's hard to find the left edge of the menu when it's drawn on the map, so clear the screen and align menus to the left edge of the screen when this option is turned off. Originally this was called the window edge patch.
This commit is contained in:
@@ -22,6 +22,7 @@ implicit_uncursed omit "uncursed" from inventory, if possible [TRUE]
|
||||
legacy print introductory message [TRUE]
|
||||
lit_corridor show a dark corridor as lit if in sight [FALSE]
|
||||
lootabc use a/b/c rather than o/i/b when looting [FALSE]
|
||||
menu_overlay overlay menus on the screen and align to right [TRUE]
|
||||
mail enable the mail daemon [TRUE]
|
||||
null allow nulls to be sent to your terminal [TRUE]
|
||||
try turning this option off (forcing NetHack to use its own
|
||||
|
||||
@@ -2218,6 +2218,10 @@ Default '>'.
|
||||
.lp menu_objsyms
|
||||
Show object symbols in menu headings in menus where
|
||||
the object symbols act as menu accelerators (default off).
|
||||
.lp menu_overlay
|
||||
Do not clear the screen before drawing menus, and align
|
||||
menus to the right edge of the screen. Only for the tty port.
|
||||
(default on)
|
||||
.lp menu_previous_page
|
||||
Menu character accelerator to goto the previous menu page.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
|
||||
@@ -2664,6 +2664,10 @@ Default `\verb+>+'.
|
||||
\item[\ib{menu\verb+_+objsyms}]
|
||||
Show object symbols in menu headings in menus where
|
||||
the object symbols act as menu accelerators (default off).
|
||||
\item[\ib{menu\verb+_+overlay}]
|
||||
Do not clear the screen before drawing menus, and align
|
||||
menus to the right edge of the screen. Only for the tty port.
|
||||
(default on)
|
||||
\item[\ib{menu\verb+_+previous\verb+_+page}]
|
||||
Menu character accelerator to goto the previous menu page.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
|
||||
@@ -150,6 +150,7 @@ database entries for Cleaver, Sunsword, Frost and Fire brands, and
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
------------------------------------------------
|
||||
tty: menu_overlay -option to clear screen and align menus to left
|
||||
|
||||
|
||||
NetHack Community Patches (or Variation) Included
|
||||
|
||||
@@ -199,6 +199,7 @@ struct instance_flags {
|
||||
boolean mention_walls; /* give feedback when bumping walls */
|
||||
boolean menu_tab_sep; /* Use tabs to separate option menu fields */
|
||||
boolean menu_head_objsym; /* Show obj symbol in menu headings */
|
||||
boolean menu_overlay; /* Draw menus over the map */
|
||||
boolean menu_requested; /* Flag for overloaded use of 'm' prefix
|
||||
* on some non-move commands */
|
||||
boolean renameallowed; /* can change hero name during role selection */
|
||||
|
||||
@@ -149,6 +149,11 @@ static struct Bool_Opt {
|
||||
/* for menu debugging only*/
|
||||
{ "menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_WIZGAME },
|
||||
{ "menu_objsyms", &iflags.menu_head_objsym, FALSE, SET_IN_GAME },
|
||||
#ifdef TTY_GRAPHICS
|
||||
{ "menu_overlay", &iflags.menu_overlay, TRUE, SET_IN_GAME },
|
||||
#else
|
||||
{ "menu_overlay", (boolean *) 0, FALSE, SET_IN_FILE },
|
||||
#endif
|
||||
{ "mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME }, /*WC*/
|
||||
#ifdef NEWS
|
||||
{ "news", &iflags.news, TRUE, DISP_IN_GAME },
|
||||
|
||||
@@ -2108,13 +2108,15 @@ boolean blocking; /* with ttys, all windows are blocking */
|
||||
if (ttyDisplay->toplin == 1)
|
||||
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
||||
#ifdef H2344_BROKEN
|
||||
if (cw->maxrow >= (int) ttyDisplay->rows)
|
||||
if (cw->maxrow >= (int) ttyDisplay->rows
|
||||
|| !iflags.menu_overlay)
|
||||
#else
|
||||
if (cw->offx == 10 || cw->maxrow >= (int) ttyDisplay->rows)
|
||||
if (cw->offx == 10 || cw->maxrow >= (int) ttyDisplay->rows
|
||||
|| !iflags.menu_overlay)
|
||||
#endif
|
||||
{
|
||||
cw->offx = 0;
|
||||
if (cw->offy) {
|
||||
if (cw->offy || iflags.menu_overlay) {
|
||||
tty_curs(window, 1, 0);
|
||||
cl_eos();
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user