Skip to content

InputAPI reference

Class ActionNames

Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input

The action names the engine’s own parts read: the widget tree’s focus and confirm (UiRoot), the default on-screen controls and prompts. They are defaults the game may rename: build the map with CreateDefault or set Names, and every engine part follows.

C#
public sealed record ActionNames : IEquatable<ActionNames>

Inheritance

object ← ActionNames

Implements

IEquatable<ActionNames>

Examples

C#
// The game calls its confirm action "accept"; engine menus follow.
protected override InputMap CreateInput() => InputMap.CreateDefault(ActionNames.Default with { Confirm = "accept" });

Constructors

ActionNames()

C#
public ActionNames()

Properties

Action

The game’s secondary action (“action”).

C#
public string Action { get; init; }

Property Value

string

Cancel

Goes back (“cancel”).

C#
public string Cancel { get; init; }

Property Value

string

Confirm

Accepts a choice or advances a dialogue (“confirm”).

C#
public string Confirm { get; init; }

Property Value

string

Default

left, right, up, down, confirm, cancel, action and pause.

C#
public static ActionNames Default { get; }

Property Value

ActionNames

Down

Moves or selects down (“down”).

C#
public string Down { get; init; }

Property Value

string

Fullscreen

Switches between a window and full screen (“fullscreen”), handled by the engine itself where the platform can change its window; F11 and Alt+Enter by default (BindFullscreenDefaults). Unbind it to free those keys, rebind it to move the toggle.

C#
public string Fullscreen { get; init; }

Property Value

string

Left

Moves or selects left (“left”).

C#
public string Left { get; init; }

Property Value

string

Pause

Pauses (“pause”).

C#
public string Pause { get; init; }

Property Value

string

Right

Moves or selects right (“right”).

C#
public string Right { get; init; }

Property Value

string

Up

Moves or selects up (“up”).

C#
public string Up { get; init; }

Property Value

string

Methods

<Clone>$()

C#
public ActionNames <Clone>$()

Returns

ActionNames

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ActionNames?)

C#
public bool Equals(ActionNames? other)

Parameters

other ActionNames?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(ActionNames?, ActionNames?)

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

Parameters

left ActionNames?

right ActionNames?

Returns

bool

operator !=(ActionNames?, ActionNames?)

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

Parameters

left ActionNames?

right ActionNames?

Returns

bool