TouchScreenMenuBase.TouchInput
A protected class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Tracks one fingertip against a touch screen menu: whether it is close, touching, and whether it swiped. Client side, one per finger.
- Listed in Global namespace: T to X
- Nested in
TouchScreenMenuBase
Constructors
| Member | What it is |
|---|---|
TouchInput(Transform fingerTip, Interactor interactor, float touchThreshold, float touchReleaseThreshold) | Creates a TouchScreenMenuBase.TouchInput from fingerTip, interactor, touchThreshold, touchReleaseThreshold and minDistanceToRenderSquared. |
TouchInput(Transform fingerTip, Interactor interactor, float touchThreshold, float touchReleaseThreshold, float minDistanceToRenderSquared) | Creates a TouchScreenMenuBase.TouchInput from fingerTip, interactor, touchThreshold, touchReleaseThreshold and minDistanceToRenderSquared. |
Fields
7 private and internal fields
Properties
| Member | What it is |
|---|---|
bool BeganTouch { get; private set; } | True only on the update where the finger first crossed the touch threshold. |
float Distance { get; private set; } | How far the fingertip is behind the screen plane, in screen space; 0 when in front. |
Vector3 FingerTipPosition { get; private set; } | World position of the fingertip at the last update. |
Interactor Interactor { get; } | The hand interactor this finger belongs to. |
bool IsClose { get; private set; } | True when the fingertip is within render distance of the screen. |
bool IsTouching { get; private set; } | True while the finger is pressed into the screen past the touch threshold. |
Vector2? Swipe { get; private set; } | Set for one update when a touch ends without hitting a button: the drag from start to end position. Otherwise null. |
Vector2 TouchPosition { get; private set; } | Fingertip position in the screen's local space. |
Methods
Used in
Members of other types that take, return or hold a TouchInput: