Class ClientColorVisionSettings
The player's colour vision: the UI tab's ACCESSIBILITY rows.
public static class ClientColorVisionSettings
- Inheritance
-
ClientColorVisionSettings
- Inherited Members
Remarks
Two parts, both following Mode:
- Safe colours, the part that matters. Mode moves the colours that
carry meaning (hostile, friendly, neutral; a better or worse stat) to ones that stay distinct, and
UITKThemeManager puts a
fish-cvd--*class on every panel root, under which FishMMO-Theme.uss redefines the meaningful tokens (resource bars, danger, rarity, map markers). - The correction filter (ColorVisionFeature): a full-screen daltonisation of the 3D view after post-processing, so the world itself separates better. It runs under the UI, which already has its safe colours, and costs one full-screen pass while on.
The values are held in statics, set at boot (ApplyAll()) and on every change, so the filter reads fields each frame and never the settings store.
Fields
DefaultStrength
The default strength of the correction filter, 0 to 1.
public const float DefaultStrength = 1
Field Value
Properties
FilterActive
Whether the correction filter draws this frame.
public static bool FilterActive { get; }
Property Value
FilterEnabled
Whether the correction filter is wanted (it runs only when Mode is not Normal).
public static bool FilterEnabled { get; }
Property Value
FilterStrength
How far the filter corrects, 0 (not at all) to 1 (fully).
public static float FilterStrength { get; }
Property Value
Mode
The colour vision chosen, as stored; Normal for a fresh install.
public static ColorVisionMode Mode { get; }
Property Value
Methods
ApplySaved()
Reads the stored settings into effect: the palette, the panels' classes and the filter.
public static void ApplySaved()
SetFilterEnabled(bool)
Writes whether the correction filter is wanted.
public static void SetFilterEnabled(bool value)
Parameters
valuebool
SetFilterStrength(float)
Writes the correction filter's strength, 0 to 1.
public static void SetFilterStrength(float value)
Parameters
valuefloat
SetMode(ColorVisionMode)
Writes the colour vision and puts it into effect.
public static void SetMode(ColorVisionMode mode)
Parameters
modeColorVisionMode
Events
OnChanged
Raised after any of these settings changes.
public static event Action OnChanged