Simplify add_menu, part 8
This commit is contained in:
+1
-2
@@ -1587,8 +1587,7 @@ do_look(int mode, coord *click_cc)
|
|||||||
MENU_ITEMFLAGS_NONE);
|
MENU_ITEMFLAGS_NONE);
|
||||||
if (!u.uswallow && !Hallucination) {
|
if (!u.uswallow && !Hallucination) {
|
||||||
any = cg.zeroany;
|
any = cg.zeroany;
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
|
add_menu_str(win, "");
|
||||||
clr, "", MENU_ITEMFLAGS_NONE);
|
|
||||||
/* these options work sensibly for the swallowed case,
|
/* these options work sensibly for the swallowed case,
|
||||||
but there's no reason for the player to use them then;
|
but there's no reason for the player to use them then;
|
||||||
objects work fine when hallucinating, but screen
|
objects work fine when hallucinating, but screen
|
||||||
|
|||||||
+6
-17
@@ -1048,8 +1048,7 @@ query_objlist(const char *qstr, /* query string */
|
|||||||
if (gt.this_title) {
|
if (gt.this_title) {
|
||||||
/* dotypeinv() supplies gt.this_title to display as initial header;
|
/* dotypeinv() supplies gt.this_title to display as initial header;
|
||||||
intentionally avoid the menu_headings highlight attribute here */
|
intentionally avoid the menu_headings highlight attribute here */
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
|
add_menu_str(win, gt.this_title);
|
||||||
clr, gt.this_title, MENU_ITEMFLAGS_NONE);
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Run through the list and add the objects to the menu. If
|
* Run through the list and add the objects to the menu. If
|
||||||
@@ -1266,9 +1265,7 @@ query_category(
|
|||||||
verify_All = (how == PICK_ANY) && ParanoidAutoAll;
|
verify_All = (how == PICK_ANY) && ParanoidAutoAll;
|
||||||
|
|
||||||
/* blank separator */
|
/* blank separator */
|
||||||
any = cg.zeroany;
|
add_menu_str(win, "");
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
|
||||||
ATR_NONE, NO_COLOR, "", MENU_ITEMFLAGS_NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
invlet = 'a';
|
invlet = 'a';
|
||||||
@@ -1312,9 +1309,7 @@ query_category(
|
|||||||
|
|
||||||
if (do_unpaid || (qflags & BILLED_TYPES) || do_blessed || do_cursed
|
if (do_unpaid || (qflags & BILLED_TYPES) || do_blessed || do_cursed
|
||||||
|| do_uncursed || do_buc_unknown || num_justpicked) {
|
|| do_uncursed || do_buc_unknown || num_justpicked) {
|
||||||
any = cg.zeroany;
|
add_menu_str(win, "");
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
|
||||||
ATR_NONE, NO_COLOR, "", MENU_ITEMFLAGS_NONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unpaid items if there are any */
|
/* unpaid items if there are any */
|
||||||
@@ -3304,9 +3299,7 @@ in_or_out_menu(
|
|||||||
add_menu(win, &nul_glyphinfo, &any, menuselector[any.a_int], 0,
|
add_menu(win, &nul_glyphinfo, &any, menuselector[any.a_int], 0,
|
||||||
ATR_NONE, clr, buf, MENU_ITEMFLAGS_NONE);
|
ATR_NONE, clr, buf, MENU_ITEMFLAGS_NONE);
|
||||||
}
|
}
|
||||||
any.a_int = 0;
|
add_menu_str(win, "");
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
|
||||||
ATR_NONE, clr, "", MENU_ITEMFLAGS_NONE);
|
|
||||||
if (more_containers) {
|
if (more_containers) {
|
||||||
any.a_int = 7; /* 'n' */
|
any.a_int = 7; /* 'n' */
|
||||||
add_menu(win, &nul_glyphinfo, &any, menuselector[any.a_int], 0,
|
add_menu(win, &nul_glyphinfo, &any, menuselector[any.a_int], 0,
|
||||||
@@ -3409,9 +3402,7 @@ dotip(void)
|
|||||||
clr, doname(cobj), MENU_ITEMFLAGS_NONE);
|
clr, doname(cobj), MENU_ITEMFLAGS_NONE);
|
||||||
}
|
}
|
||||||
if (gi.invent) {
|
if (gi.invent) {
|
||||||
any = cg.zeroany;
|
add_menu_str(win, "");
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
|
|
||||||
clr, "", MENU_ITEMFLAGS_NONE);
|
|
||||||
any.a_obj = &dummyobj;
|
any.a_obj = &dummyobj;
|
||||||
/* use 'i' for inventory unless there are so many
|
/* use 'i' for inventory unless there are so many
|
||||||
containers that it's already being used */
|
containers that it's already being used */
|
||||||
@@ -3743,9 +3734,7 @@ tipcontainer_gettarget(
|
|||||||
add_menu(win, &nul_glyphinfo, &any, '-', 0, ATR_NONE, clr,
|
add_menu(win, &nul_glyphinfo, &any, '-', 0, ATR_NONE, clr,
|
||||||
/* [TODO? vary destination string depending on surface()] */
|
/* [TODO? vary destination string depending on surface()] */
|
||||||
"on the floor", MENU_ITEMFLAGS_SELECTED);
|
"on the floor", MENU_ITEMFLAGS_SELECTED);
|
||||||
any = cg.zeroany;
|
add_menu_str(win, "");
|
||||||
add_menu(win, &nul_glyphinfo, &any, 0, 0, ATR_NONE, clr,
|
|
||||||
"", MENU_ITEMFLAGS_NONE);
|
|
||||||
|
|
||||||
n_conts = 0;
|
n_conts = 0;
|
||||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj) {
|
for (otmp = gi.invent; otmp; otmp = otmp->nobj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user