curses options and status groundwork
More groundwork for overhauling the status display for curses, plus
a few functional changes. It was doing a full status update for
every changed field (except conditions), instead of waiting for a
flush directive after gathering multiple changes at a time. Since
it already does gather every change, the fix to wait is trivial.
This decouples 'hitpointbar' from 'statushilites'. When highlighting
is off, it uses inverse video only. When on, it behaves as before:
using inverse video plus the most recent color used to highlight HP
(which can vary if that has rules to highlight changes or percentage
thresholds) but ignoring any HP attribute(s). This also enables the
latent 'statuslines' option and changes 'windowborders' option from
being settable at startup only to changeable during play.
'statuslines' can have a value of 2 (the default) or 3 and applies to
'align_status:bottom' or 'top'; it's ignored for 'left' and 'right'.
At the moment, setting it to 3 only allows status condition overflow
to wrap from the end of line to 2 to the beginning of line 3, and if
window borders are drawn they'll clobber the last character on line 2
and first one on line 3. There's no point in trying to fix that
because it will go away when the main status overhaul changes go in.
Condition wrapping for vertical orientation (left or right placement)
was already subject to the same phenomenon and will be superseded too.
This also changes the meaning of the 'windowborders' value so could
impact players using source from git (or possibly beta binaries for
Windows, but not for OSX where curses interface wasn't included).
Old:
0 = unspecified, 1 = On, 2 = Off, 3 = Auto (On if display is big
enough, Off otherwise; reevaluated after dynamic resizing);
Unspecified got changed to 3 during curses windowing initialization.
New:
0 = Off, 1 = On, 2 = Auto;
0 gets changed to 2 for default value at start of options processing.
So old value of 2 is changing meaning and explicit old value of 3 is
becoming invalid. Implicit 3 changes to default 2. Explicit 3 could
be the subject of a fixup but there isn't much point since 2 can't
have a similar fix. Users who are using old 2 or explicit 3 will need
to update their run-time config files.
This adds 'statuslines' to the Guidebook and moves some other recently
added documentation of curses options from among the general options
(section 9.4) to "Window Port Customization options" (section 9.5).
None of them have been added to dat/opthelp which seems to be missing
all the wincap options.
Originally I made a lot of changes (mostly moving C99 declarations to
start of their blocks) to the old '#if 0' code at end of cursstat.c,
but have tossed those, except for one subtle bug that assumed 'int'
and 'long' are the same size.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.276 $ $NHDT-Date: 1552697495 2019/03/16 00:51:35 $
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.277 $ $NHDT-Date: 1553204013 2019/03/21 21:33:33 $
|
||||
|
||||
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
||||
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
||||
@@ -474,8 +474,8 @@ X11: rollback disabling of keystroke input for PICK_NONE menus (for scrolling)
|
||||
curses: catch up with tty to not put dolook/whatis autodescribe feedback into
|
||||
^P message recall (multi-digit count feedback was already handled)
|
||||
curses: if the interface code ran out of memory, it would crash rather than
|
||||
attempt a controlled panic (which is fairly likely crash anyway if
|
||||
done when there's no memory available)
|
||||
attempt a controlled panic (though that's fairly likely to crash anyway
|
||||
if done when there's no more memory available)
|
||||
curses: when getting multi-character responses from player, support <delete>
|
||||
as well as <backspace> to remove last character entered; also, return
|
||||
<escape> to core if ESC is typed when there is no input entered
|
||||
@@ -483,7 +483,14 @@ curses: extend preceding <delete> support to typing of extended command names
|
||||
curses: support hilite_pet and hilite_pile even when color is disabled
|
||||
curses: support color hilite_status rules even if 'guicolor' is off
|
||||
curses: update status if 'O' is used to add/change/remove hilite_status rules
|
||||
curses: was doing a full status update for every changed field even when more
|
||||
than one field was being changed at the same time
|
||||
curses: 'hitpointbar' now works even when status highlighting is disabled
|
||||
curses: add 'statuslines' option (value is 2 or 3)
|
||||
curses: change 'windowborders' option's value (0=Off, 1=On, or 2=Auto instead
|
||||
of 1=On, 2=Off, 3=Auto; can now be changed via 'O' during play)
|
||||
vms: add compile of isaac64.c to Makefile.src and vmsbuild.com
|
||||
vms+curses: add compile support but it is known to fail to build
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes or Features
|
||||
|
||||
Reference in New Issue
Block a user