Skip to content

API reference

Class UiTheme

Namespace: MicroEngine.UI
Assembly: MicroEngine.UI.dll
Guide: UI widgets

Visual theme for the shared widgets so each game can keep its own identity.

C#
public sealed record UiTheme : IEquatable<UiTheme>

Inheritance

object ← UiTheme

Implements

IEquatable<UiTheme>

Constructors

UiTheme(PanelStyle, Color, Color, Color, Color)

Visual theme for the shared widgets so each game can keep its own identity.

C#
public UiTheme(PanelStyle Panel, Color Text, Color TextShadow, Color Accent, Color Muted)

Parameters

Panel PanelStyle

Colours of panels and boxes.

Text Color

Normal text.

TextShadow Color

The 1px shadow under text.

Accent Color

Highlights: the selected option, name tags, headings.

Muted Color

Secondary or disabled text.

Fields

Default

The built-in dark blue theme with a warm yellow accent.

C#
public static readonly UiTheme Default

Field Value

UiTheme

Properties

Accent

Highlights: the selected option, name tags, headings.

C#
public Color Accent { get; init; }

Property Value

Color

Muted

Secondary or disabled text.

C#
public Color Muted { get; init; }

Property Value

Color

Panel

Colours of panels and boxes.

C#
public PanelStyle Panel { get; init; }

Property Value

PanelStyle

Text

Normal text.

C#
public Color Text { get; init; }

Property Value

Color

TextShadow

The 1px shadow under text.

C#
public Color TextShadow { get; init; }

Property Value

Color

Methods

<Clone>$()

C#
public UiTheme <Clone>$()

Returns

UiTheme

Deconstruct(out PanelStyle, out Color, out Color, out Color, out Color)

C#
public void Deconstruct(out PanelStyle Panel, out Color Text, out Color TextShadow, out Color Accent, out Color Muted)

Parameters

Panel PanelStyle

Text Color

TextShadow Color

Accent Color

Muted Color

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(UiTheme?)

C#
public bool Equals(UiTheme? other)

Parameters

other UiTheme?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(UiTheme?, UiTheme?)

C#
public static bool operator ==(UiTheme? left, UiTheme? right)

Parameters

left UiTheme?

right UiTheme?

Returns

bool

operator !=(UiTheme?, UiTheme?)

C#
public static bool operator !=(UiTheme? left, UiTheme? right)

Parameters

left UiTheme?

right UiTheme?

Returns

bool