FR: Add improved contrast options for HUD
Some HUD elements become hard to see against certain the background of certain missions, or against certain objects, even with the "High Contrast" mode.
The simplest solution would be to add a stroke or a "drop shadow" in contrasting color to the HUD elements.
This would probably need to be a command line option.
The color of the stroke or shadow could either be set in the command line as well, or default to the most contrasting color to the HUD element's color.
Doing it as drop shadow would probably not be difficult from what I can tell of HUD code. Doing it as a stroke would probably require applying a shader to each HUD element.
Drop shadow is probably easiest to do. Just take the HUD element, darken it, and offset it a few pixels towards a corner, then draw the HUD element as normal on top of it.
Now the problem is... Should this be an engine feature or should it be baked into HUD assets by the modder? If an engine feature, the commandline option is currently the fastest way to get such a feature in, but if you want it so that the players can adjust it you'll have to use the new SCP menu UI.
Aren't HUD assets limited in their color palette? Could an edited HUD texture have a functional drop shadow?
The HUD currently allows both increased contrast and drop shadow enabled with a keybind. Is this asking for more than that?
The FR mentions strokes and dynamically changing the colors of the shadows/strokes if needed. My favorite solution would be a stroke around the text and UI elements, but I don't know how feasible this is (I guess we'd have to make a shader that dynamically generates distance fields?). Regardless, I believe that the drop-shadows are good enough for most of the use-cases.
Ah, the PR for the drops shadows also mentions something else that I think would be very good, but maybe could be a separate Issue:
Allow HUD elements to be fully opaque (currently even with alpha at 255 and High Contrast mode, they'll be slightly transparent due to how
aabitmapswork
That all seems like overkill to me. I feel like the current options handle the needs but I suppose it won't hurt anything if a developer someday wants to implement all that.