X11 popup yn_function resizing

When X11_yn_function() re-uses a popup widget to issue a prompt
and get the player's response, make it resize properly.  I'm not
sure why the old hack for that apparently worked for some folks
and not for me, or why this does work for me.  At least it does.

Also, make the minimum popup width be 25 characters so that
really short prompts don't result in tiny popups.  Since the
popup appears at whatever spot the pointer happens to be sitting,
it isn't always immediately noticeable when the player is using
the keyboard rather than the pointer.
This commit is contained in:
PatR
2021-02-21 17:30:09 -08:00
parent d6d42f56b2
commit 8195334d65
3 changed files with 71 additions and 36 deletions
-5
View File
@@ -17,11 +17,6 @@ fill that space immediately. But if it is made wider, handling of the
extra space seems to be erratic and it is sometimes left blank until
window is dismissed and re-created via 'i' or toggling 'perm_invent'.
When the 'slow' resource is off, popup yn_function sometimes doesn't
resize to fit the prompt properly. There's a hack to set the label
text twice with comment suggesting that it's there to deal with this,
but it isn't adequate to fix the problem.
When the map is clipped, sometimes panning leaves a gap in the display.
Test case was with the map manually resized to avoid overlap with the
persistent inventory window (resizing added scrollbars which hadn't