Merge remote-tracking branch 'github/tung/tty-menu-enhancements' into NetHack-3.6.0
This commit is contained in:
+6
-5
@@ -361,9 +361,6 @@ char **argv UNUSED;
|
|||||||
(void) signal(SIGWINCH, (SIG_RET_TYPE) winch_handler);
|
(void) signal(SIGWINCH, (SIG_RET_TYPE) winch_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* add one a space forward menu command alias */
|
|
||||||
add_menu_cmd_alias(' ', MENU_NEXT_PAGE);
|
|
||||||
|
|
||||||
tty_clear_nhwindow(BASE_WINDOW);
|
tty_clear_nhwindow(BASE_WINDOW);
|
||||||
|
|
||||||
tty_putstr(BASE_WINDOW, 0, "");
|
tty_putstr(BASE_WINDOW, 0, "");
|
||||||
@@ -1878,6 +1875,7 @@ struct WinDesc *cw;
|
|||||||
|
|
||||||
/* set extra chars.. */
|
/* set extra chars.. */
|
||||||
Strcat(resp, default_menu_cmds);
|
Strcat(resp, default_menu_cmds);
|
||||||
|
Strcat(resp, " "); /* next page or end */
|
||||||
Strcat(resp, "0123456789\033\n\r"); /* counts, quit */
|
Strcat(resp, "0123456789\033\n\r"); /* counts, quit */
|
||||||
Strcat(resp, gacc); /* group accelerators */
|
Strcat(resp, gacc); /* group accelerators */
|
||||||
Strcat(resp, mapped_menu_cmds);
|
Strcat(resp, mapped_menu_cmds);
|
||||||
@@ -1961,12 +1959,15 @@ struct WinDesc *cw;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* else fall through */
|
/* else fall through */
|
||||||
|
case ' ':
|
||||||
case MENU_NEXT_PAGE:
|
case MENU_NEXT_PAGE:
|
||||||
if (cw->npages > 0 && curr_page != cw->npages - 1) {
|
if (cw->npages > 0 && curr_page != cw->npages - 1) {
|
||||||
curr_page++;
|
curr_page++;
|
||||||
page_start = 0;
|
page_start = 0;
|
||||||
} else
|
} else if (morc == ' ') {
|
||||||
finished = TRUE; /* questionable behavior */
|
/* ' ' finishes menus here, but stop '>' doing the same. */
|
||||||
|
finished = TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_PREVIOUS_PAGE:
|
case MENU_PREVIOUS_PAGE:
|
||||||
if (cw->npages > 0 && curr_page != 0) {
|
if (cw->npages > 0 && curr_page != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user