FpsUI/FpsTheme.cs

Theme data class for the FPS UI. Declares color, font and layout constants used by UI views (accent, team colors, backgrounds, radii, padding). It is self-contained and intended to be passed to views.

using Sandbox;

namespace Goo.FpsUI;

// Self-contained look for the FPS UI pack. Construct one and hand it to every view.
// No dependency on Goo.Demo.Theme so the whole pack is copy-paste portable.
public sealed class FpsTheme
{
    public Color Accent  = new( 0.40f, 0.85f, 1.00f );              // kills, crosshair default, highlights
    public Color Good    = new( 0.45f, 0.90f, 0.55f );             // health high / safe
    public Color Warn    = new( 0.97f, 0.64f, 0.22f );             // danger (orange, brand rule = no red)
    public Color Ink     = new( 0.94f, 0.96f, 1.00f );             // primary text + icons
    public Color Dim     = new( 0.56f, 0.63f, 0.74f );             // secondary text
    public Color TeamFriendly = new( 0.40f, 0.72f, 1.00f );        // allied players (blue)
    public Color TeamEnemy    = new( 0.96f, 0.36f, 0.36f );        // hostile players (red, team identity not danger)
    public Color Xp           = new( 1.00f, 0.82f, 0.35f );        // XP grants (gold)
    public Color TrackBg = new Color( 0f, 0f, 0f ).WithAlpha( 0.62f ); // empty bar track
    public Color PanelBg = new Color( 0f, 0f, 0f ).WithAlpha( 0.30f ); // light card backdrop (compass strip)
    public Color BackingBg = new Color( 0f, 0f, 0f ).WithAlpha( 0.90f ); // solid HUD card backing (vitals, ammo, killfeed rows)

    public string FontFamily = "Poppins";  // any font registered in s&box, swap freely
    public int    WeightBold  = 700;        // bold numerals

    public float Radius      = 2f;   // shared corner radius for inner elements (sharp, FPS-style)
    public float PanelRadius = 4f;   // softer corner radius for card backings
    public float PanelPad    = 10f;  // inner padding for card backings
    public float Margin      = 32f;  // screen-edge inset for anchored widgets
}