Open Toodles2You opened 1 month ago
I realized that I still need to re-implement the auto-aim crosshair.
I fixed the VGUI menus getting affected. I forgot they used the same macros. I ended up making changes to the HUD elements but, only to replace the old macros with new "get" functions.
I've just tested this and when hud_scale is set to 0 after a video restart the HUD number sprites because scruffed up in >= 2560 resolutions. I haven't tested it in any lower resolutions yet but when I do I'll edit this comment and provide screenshots
Real HUD scaling!
This is achieved by having HUD elements use a reference resolution, instead of the actual window resolution. Some of the engine rendering macros have been replaced with functions that call the triangle API. These new drawing functions internally scale the HUD to fit the window.
The reference resolution is 640x480 and, as such, the 640 sprite set is used.
This feature can be toggled off via the
hud_scale
cvar. Though, it does require a video restart. It will also be disabled for software rendering.The nice part is that this requires no code changes in the actual HUD elements themselves.