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:
PatR
2016-02-08 16:32:07 -08:00
parent 518e067e82
commit c8aa84337b
4 changed files with 60 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
! $NHDT-Date: 1452920161 2016/01/16 04:56:01 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.9 $
! $NHDT-Date: 1454977917 2016/02/09 00:31:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.10 $
! The display_file, tombstone, and menu windows are all formatted assuming
! a fixed width font. Text windows may or may not be formatted as above.
@@ -68,6 +68,13 @@ NetHack*message*translations: <KeyPress>: input()
! questions is _not_ used.
NetHack*slow: True
! If 'slow' is True, setting 'highlight_prompt' to True will cause the line
! between map and message display that's used for prompting to be "hidden"
! as part of the map when no prompt is active, then invert foreground and
! background to stand out when a prompt is issued and waiting for a response.
! If 'slow' is False, 'highlight_prompt' will have no effect.
NetHack*highlight_prompt: True
! The number of lines the message window will show without scrolling.
!NetHack*message_lines: 12
!