Add Graphics Settings name color toggle and unit tests

Adds a single "Name color" toggle (Colored / Black) to the Graphics
Settings modal, backed by a `darkNames` boolean in the override schema
that derives the five underlying name-rendering fields
(fill/outline player-color flags + static outline RGB). Forcing the
outline RGB to 0 in dark mode is what makes the shader's defaultFill
ramp actually render black — flipping the boolean uniforms alone
wasn't enough because the fill is derived from uOutlineColor when
fillUsePlayerColor is false.

Flips the render-settings.json defaults so black names are the
renderer baseline; the modal's no-override state follows the JSON
source of truth. Adds tests covering schema parse behavior and the
generateRenderSettings derivation for each override field.
This commit is contained in:
evanpelle
2026-05-28 13:54:05 -07:00
parent 4cee61c7d1
commit e938e5936b
6 changed files with 174 additions and 5 deletions
+4
View File
@@ -923,6 +923,10 @@
"name_scale_label": "Name Scale",
"name_cull_label": "Minimum name size",
"name_cull_desc": "Hide names smaller than this size",
"colored_names_label": "Name color",
"colored_names_desc": "Show player names in their player color or in black",
"colored": "Colored",
"black": "Black",
"reset_label": "Reset to defaults",
"reset_desc": "Clear all graphics overrides"
},