]> granicus.if.org Git - nethack/commitdiff
^X tabbed field support
authornethack.allison <nethack.allison>
Sat, 27 Sep 2003 22:37:52 +0000 (22:37 +0000)
committernethack.allison <nethack.allison>
Sat, 27 Sep 2003 22:37:52 +0000 (22:37 +0000)
doc/fixes34.3
src/cmd.c

index 6a650852379d3a33b5ae02b4393088ed35c61182..0909437e3db7ddf81774c47207a72113c2dcff6b 100644 (file)
@@ -32,6 +32,7 @@ poles and grappling hook worked thru walls when wearing Eyes of the Overworld
 more tweaks to fog cloud behavior
 when dismounting by choice and unimpaired, try not to land on a boulder
 casting stone-to-flesh on self while wielding a statue caused problems
+add tab support to menu strings for control-x minimal_enlightenment()
 
 
 Platform- and/or Interface-Specific Fixes
index 61a2c105bada8f50a127cda4cf5dd3ada6e09fa4..3c794b6272043f8bb95dd58929631523cf3b2241 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1134,9 +1134,16 @@ minimal_enlightenment()
        anything any;
        int genidx, n;
        char buf[BUFSZ], buf2[BUFSZ];
-       static const char fmtstr[] = "%-15s: %-12s";
-       static const char deity_fmtstr[] = "%-17s%s";
-
+       static const char untabbed_fmtstr[] = "%-15s: %-12s";
+       static const char untabbed_deity_fmtstr[] = "%-17s%s";
+       static const char tabbed_fmtstr[] = "%s:\t%-12s";
+       static const char tabbed_deity_fmtstr[] = "%s\t%s";
+       static const char *fmtstr;
+       static const char *deity_fmtstr;
+
+       fmtstr = iflags.menu_tab_sep ? tabbed_fmtstr : untabbed_fmtstr;
+       deity_fmtstr = iflags.menu_tab_sep ?
+                       tabbed_deity_fmtstr : untabbed_deity_fmtstr; 
        any.a_void = 0;
        buf[0] = buf2[0] = '\0';
        tmpwin = create_nhwindow(NHW_MENU);