Skip to content

API reference

Class UiActions

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

The actions engine widgets answer to. A member left null (the default) is the input map’s own name for it (Names), read at every update: a game that renames confirm with ActionNames keeps working widgets, and a gameplay action that happens to be called confirm never presses a button. Set a member to give the widgets an action of the game’s own.

C#
public sealed record UiActions : IEquatable<UiActions>

Inheritance

object ← UiActions

Implements

IEquatable<UiActions>

Constructors

UiActions()

C#
public UiActions()

Properties

Cancel

Raises Cancelled; null is Cancel.

C#
public string? Cancel { get; init; }

Property Value

string?

Confirm

Presses the focused button or submits the focused text field; null is Confirm.

C#
public string? Confirm { get; init; }

Property Value

string?

Default

The map’s names for every action (all members null).

C#
public static UiActions Default { get; }

Property Value

UiActions

Down

Moves the focus down; null is Down.

C#
public string? Down { get; init; }

Property Value

string?

Left

Moves the focus left, or the caret of a text field; null is Left.

C#
public string? Left { get; init; }

Property Value

string?

Right

Moves the focus right, or the caret of a text field; null is Right.

C#
public string? Right { get; init; }

Property Value

string?

Up

Moves the focus up; null is Up.

C#
public string? Up { get; init; }

Property Value

string?

Methods

<Clone>$()

C#
public UiActions <Clone>$()

Returns

UiActions

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(UiActions?)

C#
public bool Equals(UiActions? other)

Parameters

other UiActions?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

NameOf(UiAction, ActionNames)

The action action is read from on names.

C#
public string NameOf(UiAction action, ActionNames names)

Parameters

action UiAction

names ActionNames

Returns

string

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(UiActions?, UiActions?)

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

Parameters

left UiActions?

right UiActions?

Returns

bool

operator !=(UiActions?, UiActions?)

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

Parameters

left UiActions?

right UiActions?

Returns

bool