provisional fix for bz239 - '[tty] Enter key...'

'... inconsistency in character creation menus'.

During role selection, the final 'is this ok?' menu has 'yes'
preselected so accepted <return> or <enter> to answer yes.  The
pick-role, pick-race, &c menus prior to getting to that stage didn't
have a default, so using <enter> meant nothing was chosen, and choosing
nothing was treated as a request to quit.  This changes that so it's a
request for 'random' instead.

'Provisional fix' because it ought to do this by making 'random' be a
pre-selected menu entry so that the default choice is visible.  But
that takes more effort than I'm inclined to expend on this.
This commit is contained in:
PatR
2016-01-06 00:07:54 -08:00
parent cb4bb72631
commit e6fa0ce809
2 changed files with 7 additions and 4 deletions

View File

@@ -100,6 +100,8 @@ tty: M-N gave "Unknown command 'M-" with "'." finishing the sentence on the
line below it, leaving bogus '.' displayed on the top row of the map
tty: specifying all four of role, race, gender, and alignment still prompted
for confirmation with "Is this ok?" before starting play
tty: responding with <return> or <enter> duing role, race, &c selection
behaved same as <escape> to quit; now it will pick [random] instead
unix/X11: in top level Makefile, some commented out definitions of VARDATND
misspelled pilemark.xbm (as pilemark.xpm)
unix/tty: fix compile warning about 'has_colors' for some configurations

View File

@@ -441,7 +441,8 @@ makepicks:
Strcpy(pbuf, "Pick a role or profession");
end_menu(win, pbuf);
n = select_menu(win, PICK_ONE, &selected);
choice = (n == 1) ? selected[0].item.a_int : ROLE_NONE;
choice = (n == 1) ? selected[0].item.a_int
: (n == 0) ? ROLE_RANDOM : ROLE_NONE;
if (selected)
free((genericptr_t) selected), selected = 0;
destroy_nhwindow(win);
@@ -526,7 +527,7 @@ makepicks:
end_menu(win, pbuf);
n = select_menu(win, PICK_ONE, &selected);
choice = (n == 1) ? selected[0].item.a_int
: ROLE_NONE;
: (n == 0) ? ROLE_RANDOM : ROLE_NONE;
if (selected)
free((genericptr_t) selected), selected = 0;
destroy_nhwindow(win);
@@ -615,7 +616,7 @@ makepicks:
end_menu(win, pbuf);
n = select_menu(win, PICK_ONE, &selected);
choice = (n == 1) ? selected[0].item.a_int
: ROLE_NONE;
: (n == 0) ? ROLE_RANDOM : ROLE_NONE;
if (selected)
free((genericptr_t) selected), selected = 0;
destroy_nhwindow(win);
@@ -700,7 +701,7 @@ makepicks:
end_menu(win, pbuf);
n = select_menu(win, PICK_ONE, &selected);
choice = (n == 1) ? selected[0].item.a_int
: ROLE_NONE;
: (n == 0) ? ROLE_RANDOM : ROLE_NONE;
if (selected)
free((genericptr_t) selected), selected = 0;
destroy_nhwindow(win);