ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
634 stars 74 forks source link

[TF2] [HUD] HUD property HealthBonusPosAdj only accepts pixel values rather than unit values #3811

Open treacherousfiend opened 2 years ago

treacherousfiend commented 2 years ago

In the HUD file HudPlayerHealth.res, The property HealthBonusPosAdj determines the size of the health cross when overhealed and when at critical health.

Instead of accepting values as units, like the rest of the HUD properties do, this one accepts it as pixels. This results in the cross being bigger at smaller resolutions and smaller at bigger ones. It also does not accept any of the scaling prefixes (f, o, and p), which is a much more minor issue, but still an annoyance

This can also make doing things in custom huds very difficult, as some things that normally would be possible if this used units are now only possible on one specific resolution.

Here are some images at 3 different resolutions for reference:

720p 20220131183511_1

1080p 20220131183442_1

4k 20220131184451_1

Niterux commented 3 weeks ago

As of the ui_scaling_test branch's release, this value is still an integer instead of proportional float unfortunately. Which means it's still dependent on resolution.