Skip to main content

Class: UiInteractionUtils

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/UiInteractionUtils.ts:7

A utility class for working with UI interaction events.

Constructors​

Constructor​

new UiInteractionUtils(): UiInteractionUtils

Returns​

UiInteractionUtils

Properties​

KNOB_EVENT_TO_KNOB_ID​

readonly static KNOB_EVENT_TO_KNOB_ID: object

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/UiInteractionUtils.ts:8

LeftKnobInnerDec​

readonly LeftKnobInnerDec: LeftInner = UiKnobId.LeftInner

LeftKnobInnerInc​

readonly LeftKnobInnerInc: LeftInner = UiKnobId.LeftInner

LeftKnobOuterDec​

readonly LeftKnobOuterDec: LeftOuter = UiKnobId.LeftOuter

LeftKnobOuterInc​

readonly LeftKnobOuterInc: LeftOuter = UiKnobId.LeftOuter

LeftKnobPress​

readonly LeftKnobPress: LeftInnerPush = UiKnobId.LeftInnerPush

LeftKnobPressLong​

readonly LeftKnobPressLong: LeftInnerPush = UiKnobId.LeftInnerPush

RightKnobInnerDec​

readonly RightKnobInnerDec: RightInner = UiKnobId.RightInner

RightKnobInnerInc​

readonly RightKnobInnerInc: RightInner = UiKnobId.RightInner

RightKnobOuterDec​

readonly RightKnobOuterDec: RightOuter = UiKnobId.RightOuter

RightKnobOuterInc​

readonly RightKnobOuterInc: RightOuter = UiKnobId.RightOuter

RightKnobPress​

readonly RightKnobPress: RightInnerPush = UiKnobId.RightInnerPush

RightKnobPressLong​

readonly RightKnobPressLong: RightInnerPush = UiKnobId.RightInnerPush

SingleKnobInnerDec​

readonly SingleKnobInnerDec: SingleInner = UiKnobId.SingleInner

SingleKnobInnerInc​

readonly SingleKnobInnerInc: SingleInner = UiKnobId.SingleInner

SingleKnobOuterDec​

readonly SingleKnobOuterDec: SingleOuter = UiKnobId.SingleOuter

SingleKnobOuterInc​

readonly SingleKnobOuterInc: SingleOuter = UiKnobId.SingleOuter

SingleKnobPress​

readonly SingleKnobPress: SingleInnerPush = UiKnobId.SingleInnerPush

SingleKnobPressLong​

readonly SingleKnobPressLong: SingleInnerPush = UiKnobId.SingleInnerPush

Methods​

getKnobTurnDirection()​

static getKnobTurnDirection(event): -1 | 1

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/UiInteractionUtils.ts:51

Gets the turn direction for a bezel rotary knob turn event.

Parameters​

ParameterTypeDescription
eventUiKnobTurnInteractionEventThe event for which to get the turn direction.

Returns​

-1 | 1

The turn direction for the specified bezel rotary knob turn event.


isKnobEvent()​

static isKnobEvent(event): event is UiKnobInteractionEvent

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/UiSystem/UiInteractionUtils.ts:42

Checks if an interaction event originated from a bezel rotary knob.

Parameters​

ParameterTypeDescription
eventUiInteractionEventThe event to check.

Returns​

event is UiKnobInteractionEvent

Whether the specified event originated from a bezel rotary knob.