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).
|
||||
|
||||
Reference in New Issue
Block a user