Simplify add_menu, part 6

This commit is contained in:
Pasi Kallinen
2023-11-03 21:48:46 +02:00
parent 93fd946ff6
commit 70c47c4054
2 changed files with 8 additions and 15 deletions

View File

@@ -788,7 +788,6 @@ nhl_text(lua_State *L)
if (argc > 0) {
menu_item *picks = (menu_item *) 0;
winid tmpwin;
anything any = cg.zeroany;
tmpwin = create_nhwindow(NHW_MENU);
start_menu(tmpwin, MENU_BEHAVE_STANDARD);
@@ -811,8 +810,7 @@ nhl_text(lua_State *L)
while ((ptr > str) && !(*ptr == ' ' || *ptr == '\n'))
ptr--;
*ptr = '\0';
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, 0,
str, MENU_ITEMFLAGS_NONE);
add_menu_str(tmpwin, str);
str = ptr + 1;
} while (*str && str <= lstr);
lua_pop(L, 1);

View File

@@ -592,18 +592,13 @@ choose_disco_sort(
/* called via 'm `' where full alphabetize doesn't make sense
(only showing one class so can't span all classes) but the
chosen sort will stick and also apply to '\' usage */
any = cg.zeroany;
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, clr,
"", MENU_ITEMFLAGS_NONE);
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, clr,
"Note: full alphabetical and alphabetical within class",
MENU_ITEMFLAGS_NONE);
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, clr,
" are equivalent for single class discovery, but",
MENU_ITEMFLAGS_NONE);
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE, clr,
" will matter for future use of total discoveries.",
MENU_ITEMFLAGS_NONE);
add_menu_str(tmpwin, "");
add_menu_str(tmpwin,
"Note: full alphabetical and alphabetical within class");
add_menu_str(tmpwin,
" are equivalent for single class discovery, but");
add_menu_str(tmpwin,
" will matter for future use of total discoveries.");
}
end_menu(tmpwin, "Ordering of discoveries");