From e6fa0ce809c106f7872c0aef01dbcd7268c5fd2e Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 6 Jan 2016 00:07:54 -0800 Subject: [PATCH] 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 or to answer yes. The pick-role, pick-race, &c menus prior to getting to that stage didn't have a default, so using 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. --- doc/fixes36.1 | 2 ++ win/tty/wintty.c | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index eae8a53ff..dee5ca524 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 or duing role, race, &c selection + behaved same as 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 diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 96cc9b1ee..58dee65a3 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -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); -- 2.50.1