interface groundwork for core-side color decisions
(user-side decisions really, but as it stands right now user-side decisions/options are made and processed by the core) add a parameter to add_menu so color can be passed
This commit is contained in:
11
src/weapon.c
11
src/weapon.c
@@ -1161,6 +1161,7 @@ enhance_weapon_skill(void)
|
||||
anything any;
|
||||
winid win;
|
||||
boolean speedy = FALSE;
|
||||
int clr = 0;
|
||||
|
||||
/* player knows about #enhance, don't show tip anymore */
|
||||
g.context.enhance_tip = TRUE;
|
||||
@@ -1198,17 +1199,17 @@ enhance_weapon_skill(void)
|
||||
? "when you're more experienced"
|
||||
: "if skill slots become available");
|
||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
||||
ATR_NONE, buf, MENU_ITEMFLAGS_NONE);
|
||||
ATR_NONE, clr, buf, MENU_ITEMFLAGS_NONE);
|
||||
}
|
||||
if (maxxed_cnt > 0) {
|
||||
Sprintf(buf,
|
||||
"(Skill%s flagged by \"#\" cannot be enhanced any further.)",
|
||||
plur(maxxed_cnt));
|
||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
||||
ATR_NONE, buf, MENU_ITEMFLAGS_NONE);
|
||||
ATR_NONE, clr, buf, MENU_ITEMFLAGS_NONE);
|
||||
}
|
||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
||||
ATR_NONE, "", MENU_ITEMFLAGS_NONE);
|
||||
ATR_NONE, clr, "", MENU_ITEMFLAGS_NONE);
|
||||
}
|
||||
|
||||
/* List the skills, making ones that could be advanced
|
||||
@@ -1222,7 +1223,7 @@ enhance_weapon_skill(void)
|
||||
any = cg.zeroany;
|
||||
if (i == skill_ranges[pass].first)
|
||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
||||
iflags.menu_headings,
|
||||
iflags.menu_headings, clr,
|
||||
skill_ranges[pass].name, MENU_ITEMFLAGS_NONE);
|
||||
|
||||
if (P_RESTRICTED(i))
|
||||
@@ -1265,7 +1266,7 @@ enhance_weapon_skill(void)
|
||||
}
|
||||
any.a_int = can_advance(i, speedy) ? i + 1 : 0;
|
||||
add_menu(win, &nul_glyphinfo, &any, 0, 0,
|
||||
ATR_NONE, buf, MENU_ITEMFLAGS_NONE);
|
||||
ATR_NONE, clr, buf, MENU_ITEMFLAGS_NONE);
|
||||
}
|
||||
|
||||
Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:"
|
||||
|
||||
Reference in New Issue
Block a user