new 'showvers' option
Add options 'showvers' (boolean) and 'versinfo' (numeric mask) to show nethack's version on the status lines during play. It won't be particularly interesting to ordinary players but should be useful when making screenshots or video to be streamed, or for someone who switches between git branches or between nethack and variants. I worked on this several months back but it was combined with unfinished changes to 'hitpointbar'. I've separated it out so that it can be put into use. When enabled, one or more components of "<name> <branch> <version>" will be shown right justified after status conditions. At present the default is "<branch>" if that is available and overall status isn't 'released', or "<version>" if 'released' or if branch isn't available. That might need some refinement. It works as intended for tty and curses, although some abbreviation mechanism would be useful if/when the program resorts to abbreviating status conditions to make things narrow enough to fit. For X11, it works ok for fancy_status:True (the default, controlled via NetHack.ad settings) but is messed up for tty-style status. The text is positioned correctly but there are gaps in it, making it appear garbled, similar to what I saw when I tried and failed to implement statuslines:3 for X11. [It might be due to having empty condition widgets be 1 pixel wide instead of being totally removed but I don't think the situation is that simple.] For Qt, if the text needs to be truncated in order to fit, the center portion of the string will be shown, discarding parts from the left and right. That ought to discard from left and retain rightmost portion instead. For win32|mswin|Win GUI, no attempt to support it has been included. Things should be ok when 'showvers' is left as False (the default) but I don't know what will happen if that gets toggled to True. At a minimum, the version info won't be right justified. The information, or at least some of it, is displayed in the game window's title bar so there isn't any pressing need to add it to status, but toggling the option will need to behave sensibly if it doesn't already.
This commit is contained in:
@@ -4580,11 +4580,23 @@ Show your accumulated experience points on bottom line (default off).
|
||||
Persistent.
|
||||
.lp showrace
|
||||
Display yourself as the glyph for your race, rather than the glyph
|
||||
for your role (default off). Note that this setting affects only
|
||||
for your role (default off).
|
||||
Note that this setting affects only
|
||||
the appearance of the display, not the way the game treats you.
|
||||
Persistent.
|
||||
.lp showscore
|
||||
Show your approximate accumulated score on bottom line (default off).
|
||||
By default, this feature is suppressed when building the program.
|
||||
Persistent.
|
||||
.lp showvers
|
||||
Include the game's version number on the status lines (default off).
|
||||
Potentially useful if you switch between different versions or variants,
|
||||
or you are making screenshots or streaming video.
|
||||
Using the
|
||||
.op statuslines:3
|
||||
option is recommended so that there will be more room available for
|
||||
status information, unless you're using nethack's \fIQt\fP interface
|
||||
or your terminal emulator window displays fewer than 25 lines.
|
||||
Persistent.
|
||||
.lp "silent "
|
||||
Suppress terminal beeps (default on).
|
||||
|
||||
@@ -5021,6 +5021,18 @@ Persistent.
|
||||
%.lp
|
||||
\item[\ib{showscore}]
|
||||
Show your approximate accumulated score on bottom line (default off).
|
||||
By default, this feature is suppressed when building the program.
|
||||
Persistent.
|
||||
%.lp
|
||||
\item[\ib{showvers}]
|
||||
Include the game's version number on the status lines (default off).
|
||||
Potentially useful if you switch between different versions or variants,
|
||||
or you are making screenshots or streaming video.
|
||||
Using the
|
||||
{\it statuslines:3\/}
|
||||
option is recommended so that there will be more room available for
|
||||
status information, unless you're using nethack's {\it Qt\/} interface
|
||||
or your terminal emulator window displays fewer than 25 lines.
|
||||
Persistent.
|
||||
%.lp
|
||||
\item[\ib{silent}]
|
||||
|
||||
@@ -2504,6 +2504,9 @@ accessibility command #lookaround which will describe what hero can see
|
||||
if hero is punished or tethered to a buried iron ball and has no inventory (or
|
||||
only carries gold or embedded dragon scales or both), a nymph might
|
||||
remove the chain when finding nothing else to steal
|
||||
'showvers' option (and companion 'versinfo' option) to include program version
|
||||
in the status display so that it will be visible for screenshots or
|
||||
during streaming video
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
@@ -453,7 +453,7 @@ status_enablefield(int fldindex, char fldname, char fieldfmt, boolean enable)
|
||||
BL_TITLE, BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH,
|
||||
BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,
|
||||
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX,
|
||||
BL_LEVELDESC, BL_EXP, BL_CONDITION
|
||||
BL_LEVELDESC, BL_EXP, BL_CONDITION, BL_VERS
|
||||
-- There are MAXBLSTATS status fields (from botl.h)
|
||||
status_update(int fldindex, genericptr_t ptr, int chg, int percentage, \
|
||||
int color, long *colormasks)
|
||||
@@ -464,7 +464,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage, \
|
||||
BL_TITLE, BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH,
|
||||
BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,
|
||||
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX,
|
||||
BL_LEVELDESC, BL_EXP, BL_CONDITION
|
||||
BL_LEVELDESC, BL_EXP, BL_CONDITION, BL_VERS
|
||||
-- fldindex could also be BL_FLUSH (-1), which is not really
|
||||
a field index, but is a special trigger to tell the
|
||||
windowport that it should output all changes received
|
||||
|
||||
Reference in New Issue
Block a user