width of curses menus

Menus with wide header or separator lines were rendered wide enough
to avoid wrapping those lines, but ones with narrow header/separators
and wide selectable entries were limited to half the display even
though lots of lines that would fit with full width were being wrapped.
Change the latter behavior.

Menus are right justified with the edge of the map when narrower than
it, left justified otherwise, and if the display is wider than the map,
they'll extend beyond its right edge.  (That hasn't actually changed;
it's just that left-justification is more likely now that menus will
be wide enough to show wide inventory lines without wrapping.)

Get rid of my ridiculous hack to force wider menu for the 'symset'
and 'roguesymset' sub-menus of 'O' since it's no longer useful.

There's still room for improvement.  If any lines need to be wrapped
despite using the full width, or perhaps are just a lot wider than
most of the entries, menu width could be narrowed to just enough for
'normal' lines to fit so that one or two really long entries don't
distort the menu.  That's a bit more complicated than I want to deal
with right now.  [If implemented, it would be relevant for tty too.]
This commit is contained in:
PatR
2019-11-11 12:55:50 -08:00
parent a49f039e6f
commit f5452848a5
3 changed files with 24 additions and 61 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ $NHDT-Date: 1573290414 2019/11/09 09:06:54 $
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.171 $ $NHDT-Date: 1573505739 2019/11/11 20:55:39 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -221,7 +221,8 @@ playing music while hallucinating: message misspelled "butterflies"
putting on gloves while having slippery fingers transfered slipperiness to
those gloves; taking off slippery gloves directly was disallowed but
losing them in other ways transfered slipperiness to bare fingers
fix use of bcsign on a freed obj
when a monster reads a scroll of fire to cure sliming, don't access that
scroll's memory after it has been used up (bcsign)
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
@@ -329,6 +330,7 @@ curses: enable the 'use_inverse' boolean option (via wincap WC_INVERSE flag)
to override default of False (for tty's benefit)
curses: force 'O' command's menus for 'symset' and 'roguesymset' options to
be wider so that fewer entries with set descriptions will wrap
curses: stop restricting menu width to half the display width
curses+'perm_invent': entries were wrapping without any control; usually not
noticeable because next entry overwrote, but visible for final entry
when whole inventory fit within the available height; looked ok with