InputAPI reference
Class TouchStick
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.Touch.dll
Guide: Input
An analog joystick: a 2D value with intensity (Vector) and, beyond Threshold, the four direction actions as well, so digital code keeps working.
public sealed record TouchStick : TouchControl, IEquatable<TouchControl>, IEquatable<TouchStick>Inheritance
object ← TouchControl ← TouchStick
Implements
IEquatable<TouchControl>, IEquatable<TouchStick>
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
TouchStick(string, string, string, string, string)
An analog joystick: a 2D value with intensity (Vector) and, beyond Threshold, the four direction actions as well, so digital code keeps working.
public TouchStick(string Id = "stick", 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
Radial dead zone as a fraction of the radius.
public float DeadZone { get; init; }Property Value
Directions
Whether the stick presses directions in eight sectors (the default) or four.
public StickDirections Directions { 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
Placement
Whether the stick stays at its anchored position or appears under the thumb (floating, the default).
public StickPlacement Placement { get; init; }Property Value
Right
public string Right { get; init; }Property Value
Threshold
Deflection beyond the dead zone at which direction actions go down.
public float Threshold { get; init; }Property Value
Up
public string Up { get; init; }Property Value
Zone
For a floating stick, where a thumb may start it, as fractions (0..1) of the safe area. Default: the lower left.
public RectF Zone { get; init; }Property Value
Methods
<Clone>$()
public override TouchStick <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(TouchStick?)
public bool Equals(TouchStick? other)Parameters
other TouchStick?
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 ==(TouchStick?, TouchStick?)
public static bool operator ==(TouchStick? left, TouchStick? right)Parameters
left TouchStick?
right TouchStick?
Returns
operator !=(TouchStick?, TouchStick?)
public static bool operator !=(TouchStick? left, TouchStick? right)Parameters
left TouchStick?
right TouchStick?