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:
nhmall
2022-06-25 13:21:51 -04:00
parent b60dae1706
commit 2770223d10
44 changed files with 437 additions and 306 deletions

View File

@@ -667,6 +667,7 @@ nhl_menu(lua_State *L)
winid tmpwin;
anything any;
menu_item *picks = (menu_item *) 0;
int clr = 0;
if (argc < 2 || argc > 4) {
nhl_error(L, "Wrong args");
@@ -709,7 +710,7 @@ nhl_menu(lua_State *L)
any = cg.zeroany;
if (*key)
any.a_char = key[0];
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, str,
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, clr, str,
(*defval && *key && defval[0] == key[0])
? MENU_ITEMFLAGS_SELECTED : MENU_ITEMFLAGS_NONE);