curses: honor menu_next_page/&c option settings
tty and X11 honor the menu_xxx options. Qt currently doesn't support menu manipulation by keyboard. curses does support that but was only handling the default menu keys.
This commit is contained in:
@@ -378,6 +378,7 @@ spells that require a target spot rather than a direction (like skilled
|
||||
prevent wish request "death wand" from matching Death monster and producing a
|
||||
random wand instead of a wand of death
|
||||
grammar bit: "you hear a [AEF] note squeak in the distance" (should be "an")
|
||||
curses interface failed to honor menu_xxx option settings for menu interaction
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
@@ -1305,7 +1305,7 @@ menu_display_page(nhmenu *menu, WINDOW * win, int page_num, char *selectors)
|
||||
static int
|
||||
menu_get_selections(WINDOW * win, nhmenu *menu, int how)
|
||||
{
|
||||
int curletter;
|
||||
int curletter, menucmd;
|
||||
int count = -1;
|
||||
int count_letter = '\0';
|
||||
int curpage = !menu->bottom_heavy ? 1 : menu->num_pages;
|
||||
@@ -1342,7 +1342,9 @@ menu_get_selections(WINDOW * win, nhmenu *menu, int how)
|
||||
break;
|
||||
case PICK_ANY:
|
||||
if (curletter <= 0 || curletter >= 256 || !selectors[curletter]) {
|
||||
switch (curletter) {
|
||||
menucmd = (curletter <= 0 || curletter >= 255) ? curletter
|
||||
: (int) (uchar) map_menu_cmd(curletter);
|
||||
switch (menucmd) {
|
||||
case MENU_SELECT_PAGE:
|
||||
(void) menu_operation(win, menu, SELECT, curpage);
|
||||
break;
|
||||
@@ -1377,7 +1379,9 @@ menu_get_selections(WINDOW * win, nhmenu *menu, int how)
|
||||
}
|
||||
|
||||
if (curletter <= 0 || curletter >= 256 || !selectors[curletter]) {
|
||||
switch (curletter) {
|
||||
menucmd = (curletter <= 0 || curletter >= 255) ? curletter
|
||||
: (int) (uchar) map_menu_cmd(curletter);
|
||||
switch (menucmd) {
|
||||
case KEY_ESC:
|
||||
num_selected = -1;
|
||||
dismiss = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user