Skip to content

InputAPI reference

Struct ActionPrompt

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

How to show one action to the player on one device: “Z” on a keyboard, “A” on an Xbox pad, “×” on a PlayStation pad, the button’s own label on a touch screen. Text is what to print; Kind and the other members let a game draw a glyph instead (a key cap, a coloured pad button).

C#
public readonly struct ActionPrompt : IEquatable<ActionPrompt>

Implements

IEquatable<ActionPrompt>

Constructors

ActionPrompt(string, InputDevice, PromptKind, string)

How to show one action to the player on one device: “Z” on a keyboard, “A” on an Xbox pad, “×” on a PlayStation pad, the button’s own label on a touch screen. Text is what to print; Kind and the other members let a game draw a glyph instead (a key cap, a coloured pad button).

C#
public ActionPrompt(string Action, InputDevice Device, PromptKind Kind, string Text)

Parameters

Action string

The action shown.

Device InputDevice

The device it is shown for.

Kind PromptKind

What Text stands for.

Text string

Short text for the control (“Z”, “Space”, “A”, “←”, “JUMP”).

Properties

Action

The action shown.

C#
public string Action { get; init; }

Property Value

string

Button

The button, for PadButton.

C#
public PadButton Button { get; init; }

Property Value

PadButton

Control

The touch control’s id, for Touch.

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

Property Value

string?

Device

The device it is shown for.

C#
public InputDevice Device { get; init; }

Property Value

InputDevice

Key

The key, for Key.

C#
public Key Key { get; init; }

Property Value

Key

Kind

What Text stands for.

C#
public PromptKind Kind { get; init; }

Property Value

PromptKind

PadStyle

The gamepad family the button is named for.

C#
public GamepadStyle PadStyle { get; init; }

Property Value

GamepadStyle

Text

Short text for the control (“Z”, “Space”, “A”, “←”, “JUMP”).

C#
public string Text { get; init; }

Property Value

string

Methods

Deconstruct(out string, out InputDevice, out PromptKind, out string)

C#
public void Deconstruct(out string Action, out InputDevice Device, out PromptKind Kind, out string Text)

Parameters

Action string

Device InputDevice

Kind PromptKind

Text string

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(ActionPrompt)

C#
public bool Equals(ActionPrompt other)

Parameters

other ActionPrompt

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(ActionPrompt, ActionPrompt)

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

Parameters

left ActionPrompt

right ActionPrompt

Returns

bool

operator !=(ActionPrompt, ActionPrompt)

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

Parameters

left ActionPrompt

right ActionPrompt

Returns

bool