PR #1406 = use_menu_glyphs for curses and tty
Pull request from NullCGT: add 'use_menu_glyphs' option to be able show the object class symbol in menus of objects. tty: |a ? scroll of identify (instead of 'a - scroll of identify'), curses: | a) ? scroll of identify (instead of ' a) scroll of identify'). This commit fixes a bit of formatting in wintty.c. Closes #1406
This commit is contained in:
+11
-7
@@ -1461,15 +1461,19 @@ process_menu_window(winid window, struct WinDesc *cw)
|
|||||||
(void) putchar('+'); /* all selected */
|
(void) putchar('+'); /* all selected */
|
||||||
else
|
else
|
||||||
(void) putchar('#'); /* count selected */
|
(void) putchar('#'); /* count selected */
|
||||||
} else if (iflags.use_menu_glyphs && n == 2
|
} else if (iflags.use_menu_glyphs && n == 2
|
||||||
&& curr->identifier.a_void != 0
|
&& curr->identifier.a_void != 0
|
||||||
&& curr->glyphinfo.glyph != NO_GLYPH) {
|
&& curr->glyphinfo.glyph != NO_GLYPH) {
|
||||||
/* tty_print_glyph could be used, but is overkill and requires referencing the cursor location */
|
int gcolor = curr->glyphinfo.gm.sym.color;
|
||||||
toggle_menu_attr(TRUE, curr->glyphinfo.gm.sym.color, ATR_NONE);
|
|
||||||
|
/* tty_print_glyph could be used, but is overkill
|
||||||
|
and requires referencing the cursor location */
|
||||||
|
toggle_menu_attr(TRUE, gcolor, ATR_NONE);
|
||||||
(void) putchar(curr->glyphinfo.ttychar);
|
(void) putchar(curr->glyphinfo.ttychar);
|
||||||
toggle_menu_attr(FALSE, curr->glyphinfo.gm.sym.color, ATR_NONE);
|
toggle_menu_attr(FALSE, gcolor, ATR_NONE);
|
||||||
} else
|
} else {
|
||||||
(void) putchar(*cp);
|
(void) putchar(*cp);
|
||||||
|
}
|
||||||
} /* for *cp */
|
} /* for *cp */
|
||||||
if (n > attr_n && (color != NO_COLOR || attr != ATR_NONE))
|
if (n > attr_n && (color != NO_COLOR || attr != ATR_NONE))
|
||||||
toggle_menu_attr(FALSE, color, attr);
|
toggle_menu_attr(FALSE, color, attr);
|
||||||
|
|||||||
Reference in New Issue
Block a user