window port interface change - add mbehavior flags to start_menu()
Provide a way to communicate additional behaviors and/or appearances desired from NetHack window port menus. This is foundation work for changes to follow at a future date.
This commit is contained in:
@@ -241,7 +241,7 @@ Gem_player_selection()
|
||||
} else {
|
||||
/* Prompt for a role */
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
start_menu(win);
|
||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||
any.a_void = 0; /* zero out all bits */
|
||||
for (i = 0; roles[i].name.m; i++) {
|
||||
if (ok_role(i, flags.initrace, flags.initgend,
|
||||
@@ -313,7 +313,7 @@ Gem_player_selection()
|
||||
/* Permit the user to pick, if there is more than one */
|
||||
if (n > 1) {
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
start_menu(win);
|
||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||
any.a_void = 0; /* zero out all bits */
|
||||
for (i = 0; races[i].noun; i++)
|
||||
if (ok_race(flags.initrole, i, flags.initgend,
|
||||
@@ -382,7 +382,7 @@ Gem_player_selection()
|
||||
/* Permit the user to pick, if there is more than one */
|
||||
if (n > 1) {
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
start_menu(win);
|
||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||
any.a_void = 0; /* zero out all bits */
|
||||
for (i = 0; i < ROLE_GENDERS; i++)
|
||||
if (ok_gend(flags.initrole, flags.initrace, i,
|
||||
@@ -451,7 +451,7 @@ Gem_player_selection()
|
||||
/* Permit the user to pick, if there is more than one */
|
||||
if (n > 1) {
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
start_menu(win);
|
||||
start_menu(win, MENU_BEHAVE_STANDARD);
|
||||
any.a_void = 0; /* zero out all bits */
|
||||
for (i = 0; i < ROLE_ALIGNS; i++)
|
||||
if (ok_align(flags.initrole, flags.initrace,
|
||||
@@ -1002,7 +1002,7 @@ Gem_get_ext_cmd()
|
||||
const char *ptr;
|
||||
|
||||
wind = Gem_create_nhwindow(NHW_MENU);
|
||||
Gem_start_menu(wind);
|
||||
Gem_start_menu(wind, MENU_BEHAVE_STANDARD);
|
||||
for (i = 0; (ptr = extcmdlist[i].ef_txt); i++) {
|
||||
any.a_int = i;
|
||||
accelerator = *ptr;
|
||||
|
||||
@@ -1424,8 +1424,9 @@ mar_more()
|
||||
|
||||
/************************* Gem_start_menu *******************************/
|
||||
void
|
||||
Gem_start_menu(win)
|
||||
Gem_start_menu(win, mbehavior)
|
||||
winid win;
|
||||
unsigned long mbehavior UNUSED;
|
||||
{
|
||||
win = win;
|
||||
if (invent_list) {
|
||||
@@ -2551,7 +2552,7 @@ winid window;
|
||||
use_rip = FALSE;
|
||||
break;
|
||||
case NHW_MENU:
|
||||
Gem_start_menu(window); /* delete invent_list */
|
||||
Gem_start_menu(window, MENU_BEHAVE_STANDARD); /* delete invent_list */
|
||||
test_free(Menu_title);
|
||||
break;
|
||||
case 0: /* No window available, probably an error message? */
|
||||
|
||||
Reference in New Issue
Block a user