revert B14005 cmdassist font fix

This commit is contained in:
nethack.allison
2003-01-02 04:00:46 +00:00
parent da912b0780
commit ec3b1bf40e

View File

@@ -150,8 +150,6 @@ static const char* readchar_queue="";
STATIC_DCL char *NDECL(parse);
STATIC_DCL boolean FDECL(help_dir, (CHAR_P, char *));
STATIC_DCL void FDECL(help_out, (winid, char *, BOOLEAN_P));
#ifdef OVL1
@@ -2025,22 +2023,6 @@ const char *s;
return 1;
}
STATIC_OVL void
help_out(win, str, use_menu)
winid win;
char *str;
boolean use_menu;
{
if (use_menu) {
anything any;
any.a_void = 0;
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, str, MENU_UNSELECTED);
} else {
putstr(win, 0, str);
}
return;
}
STATIC_OVL boolean
help_dir(sym, msg)
char sym;
@@ -2049,24 +2031,14 @@ char *msg;
char ctrl;
winid win;
char *wiz_only_list = "EFGIOVW";
menu_item *selected;
char buf[BUFSZ], buf2[BUFSZ], *expl;
boolean use_menu = FALSE;
/* use menu window rather than text to display the help */
if (!strncmpi(windowprocs.name, "x11", 3))
use_menu = TRUE;
if (!use_menu && msg) {
win = create_nhwindow(NHW_TEXT);
if (!win) return FALSE;
win = create_nhwindow(NHW_TEXT);
if (!win) return FALSE;
if (msg) {
Sprintf(buf, "cmdassist: %s", msg);
help_out(win, buf, use_menu);
help_out(win, "", use_menu);
} else {
win = create_nhwindow(NHW_MENU);
if (!win) return FALSE;
start_menu(win);
putstr(win, 0, buf);
putstr(win, 0, "");
}
if (letter(sym)) {
sym = highc(sym);
@@ -2080,46 +2052,39 @@ char *msg;
Sprintf(buf, "Are you trying to use ^%c%s?", sym,
index(wiz_only_list, sym) ? "" :
" as specified in the Guidebook");
help_out(win, buf, use_menu);
help_out(win, "", use_menu);
help_out(win, expl, use_menu);
help_out(win, "", use_menu);
help_out(win, "To use that command, you press", use_menu);
putstr(win, 0, buf);
putstr(win, 0, "");
putstr(win, 0, expl);
putstr(win, 0, "");
putstr(win, 0, "To use that command, you press");
Sprintf(buf,
"the <Ctrl> key, and the <%c> key at the same time.", sym);
help_out(win, buf, use_menu);
help_out(win, "", use_menu);
putstr(win, 0, buf);
putstr(win, 0, "");
}
}
if (iflags.num_pad) {
help_out(win, "Valid direction keys (with number_pad on) are:", use_menu);
help_out(win, " 7 8 9", use_menu);
help_out(win, " \\ | / ", use_menu);
help_out(win, " 4- . -6", use_menu);
help_out(win, " / | \\ ", use_menu);
help_out(win, " 1 2 3", use_menu);
putstr(win, 0, "Valid direction keys (with number_pad on) are:");
putstr(win, 0, " 7 8 9");
putstr(win, 0, " \\ | / ");
putstr(win, 0, " 4- . -6");
putstr(win, 0, " / | \\ ");
putstr(win, 0, " 1 2 3");
} else {
help_out(win, "Valid direction keys are:", use_menu);
help_out(win, " y k u", use_menu);
help_out(win, " \\ | / ", use_menu);
help_out(win, " h- . -l", use_menu);
help_out(win, " / | \\ ", use_menu);
help_out(win, " b j n", use_menu);
putstr(win, 0, "Valid direction keys are:");
putstr(win, 0, " y k u");
putstr(win, 0, " \\ | / ");
putstr(win, 0, " h- . -l");
putstr(win, 0, " / | \\ ");
putstr(win, 0, " b j n");
};
help_out(win, "", use_menu);
help_out(win, " < up", use_menu);
help_out(win, " > down", use_menu);
help_out(win, " . direct at yourself", use_menu);
help_out(win, "", use_menu);
help_out(win, "(Suppress this message with !cmdassist in config file.)", use_menu);
if (use_menu) {
if (msg) Sprintf(buf, "cmdassist: %s", msg);
else buf[0] = '\0';
end_menu(win, buf);
(void) select_menu(win, PICK_NONE, &selected);
} else {
display_nhwindow(win, FALSE);
}
putstr(win, 0, "");
putstr(win, 0, " < up");
putstr(win, 0, " > down");
putstr(win, 0, " . direct at yourself");
putstr(win, 0, "");
putstr(win, 0, "(Suppress this message with !cmdassist in config file.)");
display_nhwindow(win, FALSE);
destroy_nhwindow(win);
return TRUE;
}