menu tab tuning
This commit is contained in:
@@ -1048,6 +1048,7 @@ minimal_enlightenment()
|
|||||||
anything any;
|
anything any;
|
||||||
char buf[BUFSZ], buf2[BUFSZ];
|
char buf[BUFSZ], buf2[BUFSZ];
|
||||||
static char fmtstr[] = "%-15s: %-12s";
|
static char fmtstr[] = "%-15s: %-12s";
|
||||||
|
char deity_fmtstr[] = "%-17s%s";
|
||||||
|
|
||||||
any.a_void = 0;
|
any.a_void = 0;
|
||||||
buf[0] = buf2[0] = '\0';
|
buf[0] = buf2[0] = '\0';
|
||||||
@@ -1099,7 +1100,7 @@ minimal_enlightenment()
|
|||||||
/* Deity list */
|
/* Deity list */
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "", FALSE);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "", FALSE);
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_BOLD, "Deities", FALSE);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_BOLD, "Deities", FALSE);
|
||||||
Sprintf(buf2, "%-17s%s", align_gname(A_CHAOTIC),
|
Sprintf(buf2, deity_fmtstr, align_gname(A_CHAOTIC),
|
||||||
(u.ualignbase[A_ORIGINAL] == u.ualign.type
|
(u.ualignbase[A_ORIGINAL] == u.ualign.type
|
||||||
&& u.ualign.type == A_CHAOTIC) ? " (s,c)" :
|
&& u.ualign.type == A_CHAOTIC) ? " (s,c)" :
|
||||||
(u.ualignbase[A_ORIGINAL] == A_CHAOTIC) ? " (s)" :
|
(u.ualignbase[A_ORIGINAL] == A_CHAOTIC) ? " (s)" :
|
||||||
@@ -1107,7 +1108,7 @@ minimal_enlightenment()
|
|||||||
Sprintf(buf, fmtstr, "chaotic deity", buf2);
|
Sprintf(buf, fmtstr, "chaotic deity", buf2);
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
|
||||||
|
|
||||||
Sprintf(buf2, "%-17s%s", align_gname(A_NEUTRAL),
|
Sprintf(buf2, deity_fmtstr, align_gname(A_NEUTRAL),
|
||||||
(u.ualignbase[A_ORIGINAL] == u.ualign.type
|
(u.ualignbase[A_ORIGINAL] == u.ualign.type
|
||||||
&& u.ualign.type == A_NEUTRAL) ? " (s,c)" :
|
&& u.ualign.type == A_NEUTRAL) ? " (s,c)" :
|
||||||
(u.ualignbase[A_ORIGINAL] == A_NEUTRAL) ? " (s)" :
|
(u.ualignbase[A_ORIGINAL] == A_NEUTRAL) ? " (s)" :
|
||||||
@@ -1115,7 +1116,7 @@ minimal_enlightenment()
|
|||||||
Sprintf(buf, fmtstr, "neutral deity", buf2);
|
Sprintf(buf, fmtstr, "neutral deity", buf2);
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
|
||||||
|
|
||||||
Sprintf(buf2, "%-17s%s", align_gname(A_LAWFUL),
|
Sprintf(buf2, deity_fmtstr, align_gname(A_LAWFUL),
|
||||||
(u.ualignbase[A_ORIGINAL] == u.ualign.type && u.ualign.type == A_LAWFUL) ? " (s,c)" :
|
(u.ualignbase[A_ORIGINAL] == u.ualign.type && u.ualign.type == A_LAWFUL) ? " (s,c)" :
|
||||||
(u.ualignbase[A_ORIGINAL] == A_LAWFUL) ? " (s)" :
|
(u.ualignbase[A_ORIGINAL] == A_LAWFUL) ? " (s)" :
|
||||||
(u.ualign.type == A_LAWFUL) ? " (c)" : "");
|
(u.ualign.type == A_LAWFUL) ? " (c)" : "");
|
||||||
|
|||||||
+6
-5
@@ -2196,7 +2196,7 @@ map_menu_cmd(ch)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char fmtstr_doset_add_menu[] = "%s%-15s [%s] ";
|
static char fmtstr_doset_add_menu[] = "%s%-15s [%s] ";
|
||||||
static char fmtstr_doset_add_menu_tab[] = "%s\t%s\t[%s] ";
|
static char fmtstr_doset_add_menu_tab[] = "%s\t[%s]";
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
doset_add_menu(win, option, indexoffset)
|
doset_add_menu(win, option, indexoffset)
|
||||||
@@ -2229,8 +2229,10 @@ doset_add_menu(win, option, indexoffset)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* " " replaces "a - " -- assumes menus follow that style */
|
/* " " replaces "a - " -- assumes menus follow that style */
|
||||||
Sprintf(buf, iflags.menu_tab_sep ? fmtstr_doset_add_menu_tab : fmtstr_doset_add_menu,
|
if (!iflags.menu_tab_sep)
|
||||||
any.a_int ? "" : iflags.menu_tab_sep ? "" : " ", option, value);
|
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ", option, value);
|
||||||
|
else
|
||||||
|
Sprintf(buf, fmtstr_doset_add_menu_tab, option, value);
|
||||||
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2274,8 +2276,7 @@ doset()
|
|||||||
pass == 0 ? " " : "",
|
pass == 0 ? " " : "",
|
||||||
boolopt[i].name, *bool_p ? "true" : "false");
|
boolopt[i].name, *bool_p ? "true" : "false");
|
||||||
else
|
else
|
||||||
Sprintf(buf, "%s\t%s\t[%s]",
|
Sprintf(buf, "%s\t[%s]",
|
||||||
pass == 0 ? " " : "",
|
|
||||||
boolopt[i].name, *bool_p ? "true" : "false");
|
boolopt[i].name, *bool_p ? "true" : "false");
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0,
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0,
|
||||||
ATR_NONE, buf, MENU_UNSELECTED);
|
ATR_NONE, buf, MENU_UNSELECTED);
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)spell.c 3.4 2002/01/19 */
|
/* SCCS Id: @(#)spell.c 3.4 2002/02/12 */
|
||||||
/* Copyright (c) M. Stephenson 1988 */
|
/* Copyright (c) M. Stephenson 1988 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -998,10 +998,14 @@ int *spell_no;
|
|||||||
* To do it right would require that we implement columns
|
* To do it right would require that we implement columns
|
||||||
* in the window-ports (say via a tab character).
|
* in the window-ports (say via a tab character).
|
||||||
*/
|
*/
|
||||||
Sprintf(buf, "%-20s Level %-12s Fail", " Name", "Category");
|
if (!iflags.menu_tab_sep)
|
||||||
|
Sprintf(buf, "%-20s Level %-12s Fail", " Name", "Category");
|
||||||
|
else
|
||||||
|
Sprintf(buf, "%-20s\tLevel\tCategory\tFail", "Name");
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||||
for (i = 0; i < MAXSPELL && spellid(i) != NO_SPELL; i++) {
|
for (i = 0; i < MAXSPELL && spellid(i) != NO_SPELL; i++) {
|
||||||
Sprintf(buf, "%-20s %2d%s %-12s %3d%%",
|
Sprintf(buf, iflags.menu_tab_sep ?
|
||||||
|
"%s\t%2d%s\t%s\t%3d%%" : "%-20s %2d%s %-12s %3d%%",
|
||||||
spellname(i), spellev(i),
|
spellname(i), spellev(i),
|
||||||
spellknow(i) ? " " : "*",
|
spellknow(i) ? " " : "*",
|
||||||
spelltypemnemonic(spell_skilltype(spellid(i))),
|
spelltypemnemonic(spell_skilltype(spellid(i))),
|
||||||
|
|||||||
Reference in New Issue
Block a user