revise X11 highlight yn prompting
The three line change I made previously to implement highlighting for prompts that ask for single-character input was easy and worked well for a tiles map, but it didn't look very good for a text map. This handles both text map and tile map and also adds a configurable 'highlight_prompt' X resource to let the user enable or disable the feature. The resource template file (win/X11/NetHack.ad, copied to $HACKDIR during install) now has it enabled by default. The highlighting--more specifically, the "lowlighting" when no prompt is active--still looks bad if the map window has a vertical scrollbar on left edge. I don't have any inspiration about how to fix that up.
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 winmap.c $NHDT-Date: 1454455161 2016/02/02 23:19:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.26 $ */
|
||||
/* NetHack 3.6 winmap.c $NHDT-Date: 1454977918 2016/02/09 00:31:58 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -883,6 +883,7 @@ struct xwindow *wp;
|
||||
XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
|
||||
set_map_size(wp, COLNO, ROWNO);
|
||||
check_cursor_visibility(wp);
|
||||
highlight_yn(TRUE); /* change fg/bg to match map */
|
||||
} else if (wp->prevx != wp->cursx || wp->prevy != wp->cursy) {
|
||||
register unsigned int x = wp->prevx, y = wp->prevy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user