more interactive role selection
This ended up combining several unrelated changes. Add missing 'fixes' entry for curses-specific item in New Features. When answering "Shall I pick ... for you? [ynaq]", accept \m as well as \n and space for choosing the default of 'y', same as normal ynaq() would. Also add '*' to '@' as not-shown potential answers; they force 'random'. When tty tore down any of the menus, things were reasonable if they were short enough for corner windows, but tall ones that switch to full screen weren't fully erased. The parts of those outside of the map window stayed behind when the tall menu was closed and cleared. Mainly affects picking the "~ - reset filtering" choice but also affected the role menu on 24 line tty screens. (Didn't affect curses because it tracks and refreshes its base window when some overlaying window goes away.) The role menu used 25 lines so required a second page for the case of a 24 line screen on tty. Dealing with that is a bit ugly but it wasn't an issue when this form of role selection was tty-only (because the info about choices made so far was displayed on the base window rather than in an extra menu line back then) so I added a hack for it. If the role menu will take one more line than the screen height, the separator between 'random' (below 'Wizard') and 'pick race first' gets squeezed out. If the menu needs two more lines (doesn't happen now, except by changing screen size to 23 lines for testing), a second line gets squeezed out. (Not attempted for curses because it wouldn't help. 'windowborders' and one or two extra separators it adds make menus taller. I doubt if many players use curses on 24-line screens but if they do, they'll be using something new rather than going from something that used to fit on one page with 3.6.x.)
This commit is contained in:
@@ -101,6 +101,7 @@ struct sinfo {
|
||||
int in_self_recover; /* processsing orphaned level files */
|
||||
int in_checkpoint; /* saving insurance checkpoint */
|
||||
int in_parseoptions; /* in parseoptions */
|
||||
int in_role_selection; /* role/race/&c selection menus in progress */
|
||||
int config_error_ready; /* config_error_add is ready, available */
|
||||
int beyond_savefile_load; /* set when past savefile loading */
|
||||
#ifdef PANICLOG
|
||||
|
||||
@@ -2418,7 +2418,7 @@ extern const char *Hello(struct monst *);
|
||||
extern const char *Goodbye(void);
|
||||
extern const struct Race *character_race(short);
|
||||
extern void genl_player_selection(void);
|
||||
extern int genl_player_setup(void);
|
||||
extern int genl_player_setup(int);
|
||||
|
||||
/* ### rumors.c ### */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user