dxx-rebirth/common
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 Move some SDL-only symbols into !DXX_USE_OGL 2019-08-06 02:59:41 +00:00
3d Move some SDL-only symbols into !DXX_USE_OGL 2019-08-06 02:59:41 +00:00
arch modify SConstruct to handle target platform; fix track finish detect code 2019-10-27 14:53:48 +02:00
editor Enable -Wformat-truncation 2018-08-26 18:10:36 +00:00
include Fix mouse-selection in listboxes 2020-04-04 19:30:23 +00:00
main Move WallAnims into d_game_shared_state 2020-04-04 19:30:22 +00:00
maths Fix integer truncation in quaternion setup 2019-04-13 18:00:07 +00:00
mem Use array<> for memdebug data 2016-10-29 23:16:15 +00:00
misc Fix Windows build of hmp.cpp 2019-05-17 02:13:22 +00:00
music Rework ADL dynamic loader 2018-10-15 00:51:53 +00:00
texmap Fix fallthrough warning in ntmap.cpp [SDL only] 2019-07-07 22:00:02 +00:00
ui Use xrange for loops with zero start and constant numerical end 2019-05-04 18:27:36 +00:00
unittest Add unit test for zip iterator 2020-02-26 05:07:34 +00:00