dxx-rebirth/similar
Kp d197ba42c3 Fix mouse-selection in listboxes
Commit d355ef4030 removed a seemingly unnecessary modification of the
global variable grd_curcanv->cv_font, after eliminating all local reads
of it.  However, a non-local read, buried in listbox_mouse, depended on
grd_curcanv->cv_font being set to a MEDIUM font.  After that commit,
grd_curcanv->cv_font retained its prior value, which is not a MEDIUM
font.  This caused listbox_mouse to compute an incorrect height of the
lines in the listbox, which manifested as the game choosing the wrong
line when the mouse is clicked in the listbox.

Fix the problem by explicitly using MEDIUM3_FONT, since that was
usually the value left in grd_curcanv->cv_font prior to that commit.  In
some cases, a different MEDIUM font would be left there, but all the
MEDIUM fonts have the same height, so they are interchangeable for this
purpose.

Reported-by: Q3BFG10K <https://github.com/dxx-rebirth/dxx-rebirth/issues/498>
Fixes: d355ef4030 ("Pass font to various drawing functions")
2020-04-04 19:30:23 +00:00
..
2d Fix mouse-selection in listboxes 2020-04-04 19:30:23 +00:00
3d Zip ranges passed to rotate_point_list 2020-02-01 22:33:31 +00:00
arch Move digi functions to dcx; use bitset for channels 2020-04-04 19:30:22 +00:00
editor Move WallAnims into d_game_shared_state 2020-04-04 19:30:22 +00:00
main Fix mouse-selection in listboxes 2020-04-04 19:30:23 +00:00
misc Fix externally reported Mac OS X build break 2019-10-23 03:02:16 +00:00