InputAPI reference
Class TouchDPad
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.Touch.dll
Guide: Input
A d-pad: discrete directions with no analog value, for games where a precise press matters more than a smooth one (platformers, grid movement, menus). The thumb anywhere around its centre presses the direction it points to.
public sealed record TouchDPad : TouchControl, IEquatable<TouchControl>, IEquatable<TouchDPad>Inheritance
object ← TouchControl ← TouchDPad
Implements
IEquatable<TouchControl>, IEquatable<TouchDPad>
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
TouchDPad(string, string, string, string, string)
A d-pad: discrete directions with no analog value, for games where a precise press matters more than a smooth one (platformers, grid movement, menus). The thumb anywhere around its centre presses the direction it points to.
public TouchDPad(string Id = "dpad", string Left = "left", string Right = "right", string Up = "up", string Down = "down")Parameters
Id string
Left string
Right string
Up string
Down string
Properties
DeadZone
Centre area, as a fraction of the radius, where no direction is pressed.
public float DeadZone { get; init; }Property Value
Diagonals
True: eight sectors (diagonals press two directions). False: four, only the dominant direction.
public bool Diagonals { get; init; }Property Value
Down
public string Down { get; init; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
Left
public string Left { get; init; }Property Value
Right
public string Right { get; init; }Property Value
Up
public string Up { get; init; }Property Value
Methods
<Clone>$()
public override TouchDPad <Clone>$()Returns
Deconstruct(out string, out string, out string, out string, out string)
public void Deconstruct(out string Id, out string Left, out string Right, out string Up, out string Down)Parameters
Id string
Left string
Right string
Up string
Down 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(TouchDPad?)
public bool Equals(TouchDPad? other)Parameters
other TouchDPad?
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 ==(TouchDPad?, TouchDPad?)
public static bool operator ==(TouchDPad? left, TouchDPad? right)Parameters
left TouchDPad?
right TouchDPad?
Returns
operator !=(TouchDPad?, TouchDPad?)
public static bool operator !=(TouchDPad? left, TouchDPad? right)Parameters
left TouchDPad?
right TouchDPad?