InputAPI reference
Class TouchButton
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.Touch.dll
Guide: Input
A button that presses an action (and optionally more, as one key may: Also = [“confirm”] on a jump button).
public sealed record TouchButton : TouchControl, IEquatable<TouchControl>, IEquatable<TouchButton>Inheritance
object ← TouchControl ← TouchButton
Implements
IEquatable<TouchControl>, IEquatable<TouchButton>
Inherited Members
TouchControl.ToString(), TouchControl.GetHashCode(), TouchControl.Equals(object?), TouchControl.Equals(TouchControl?), TouchControl.<Clone>$(), TouchControl.Deconstruct(out string), TouchControl.Id, TouchControl.Anchor, TouchControl.Offset, TouchControl.Radius, TouchControl.Visible, TouchControl.Style, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
TouchButton(string, string, string?)
A button that presses an action (and optionally more, as one key may: Also = [“confirm”] on a jump button).
public TouchButton(string Id, string Action, string? Label = null)Parameters
Id string
Action string
Label string?
Short text drawn on it (“A”, “JUMP”); null draws none.
Properties
Action
public string Action { get; init; }Property Value
Also
Further actions the button presses with Action, like a key bound to several actions.
public IReadOnlyList<string> Also { get; init; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
Label
Short text drawn on it (“A”, “JUMP”); null draws none.
public string? Label { get; init; }Property Value
Mode
Whether the action is down while held (the default) or toggled by each tap.
public TouchButtonMode Mode { get; init; }Property Value
Methods
<Clone>$()
public override TouchButton <Clone>$()Returns
Deconstruct(out string, out string, out string?)
public void Deconstruct(out string Id, out string Action, out string? Label)Parameters
Id string
Action string
Label string?
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(TouchControl?)
public override sealed bool Equals(TouchControl? other)Parameters
other TouchControl?
Returns
Equals(TouchButton?)
public bool Equals(TouchButton? other)Parameters
other TouchButton?
Returns
GetHashCode()
public override int GetHashCode()Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)Parameters
builder StringBuilder
Returns
ToString()
public override string ToString()Returns
Operators
operator ==(TouchButton?, TouchButton?)
public static bool operator ==(TouchButton? left, TouchButton? right)Parameters
left TouchButton?
right TouchButton?
Returns
operator !=(TouchButton?, TouchButton?)
public static bool operator !=(TouchButton? left, TouchButton? right)Parameters
left TouchButton?
right TouchButton?