Dialog fixes
-
Prevent use item dialogs from being positioned off the left edge of the screen.
This usually occurred on worn items with long names on the inventory screen.
-
Fix dialogs sometimes being too narrow for title (font caching issues).
This occurred because the dialog font "font_bold" would get merged with the normal font by the font caching code.
-
Use integer background texture dimensions where appropriate.
Fix improper use of a float dimension where an integer was needed. This broke a log print and cause a compile warning.
-
Workaround for save dialogs not drawing properly on Linux.
Save/load dialogs would not display properly on Linux (Linux Mint 20.1). The "wait image" for the dialog was not being captured properly. I have a feeling that the root cause has to do with SDL event handling on Linux. However, I was able to change the way the wait image is captured to work around the problem.
-
Remove some unnecessary redraws.
I removed the seemingly unneeded forced redraw after use of the save/load dialogs. I didn't see any difference in light testing on Linux and Windows.
NOTE: I do not have access to a Mac and did not exhaustively test all dialogs, so feel free to reject this last change if it causes any problems.