groundwork for window port interface change to add_menu
groundwork only - window port interface change This changes the last parameter for add_menu() from a boolean to an unsigned int, to allow additional itemflags in future beyond just the "preselected" that the original boolean offered. There shouldn't be any functionality changes with this groundwork-only change, and if there are it is unintentional and should be reported.
This commit is contained in:
10
src/role.c
10
src/role.c
@@ -1902,24 +1902,24 @@ boolean preselect;
|
||||
/* use four spaces of padding to fake a grayed out menu choice */
|
||||
Sprintf(buf, "%4s%s forces %s", "", constrainer, forcedvalue);
|
||||
add_menu(where, NO_GLYPH, &any, 0, 0, ATR_NONE, buf,
|
||||
MENU_UNSELECTED);
|
||||
MENU_ITEMFLAGS_NONE);
|
||||
} else if (what) {
|
||||
any.a_int = RS_menu_arg(which);
|
||||
Sprintf(buf, "Pick%s %s first", (f >= 0) ? " another" : "", what);
|
||||
add_menu(where, NO_GLYPH, &any, RS_menu_let[which], 0, ATR_NONE, buf,
|
||||
MENU_UNSELECTED);
|
||||
MENU_ITEMFLAGS_NONE);
|
||||
} else if (which == RS_filter) {
|
||||
any.a_int = RS_menu_arg(RS_filter);
|
||||
add_menu(where, NO_GLYPH, &any, '~', 0, ATR_NONE,
|
||||
"Reset role/race/&c filtering", MENU_UNSELECTED);
|
||||
"Reset role/race/&c filtering", MENU_ITEMFLAGS_NONE);
|
||||
} else if (which == ROLE_RANDOM) {
|
||||
any.a_int = ROLE_RANDOM;
|
||||
add_menu(where, NO_GLYPH, &any, '*', 0, ATR_NONE, "Random",
|
||||
preselect ? MENU_SELECTED : MENU_UNSELECTED);
|
||||
preselect ? MENU_ITEMFLAGS_SELECTED : MENU_ITEMFLAGS_NONE);
|
||||
} else if (which == ROLE_NONE) {
|
||||
any.a_int = ROLE_NONE;
|
||||
add_menu(where, NO_GLYPH, &any, 'q', 0, ATR_NONE, "Quit",
|
||||
preselect ? MENU_SELECTED : MENU_UNSELECTED);
|
||||
preselect ? MENU_ITEMFLAGS_SELECTED : MENU_ITEMFLAGS_NONE);
|
||||
} else {
|
||||
impossible("role_menu_extra: bad arg (%d)", which);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user