Pointer
interludesoftware.tick¶
Interlude.Tick¶
Pointer Struct¶
A single active pointing device at a single point in time. Returned by GetPointer(int); the per-frame set is enumerated via GetPointerCount().
The provider always reports the mouse at index 0, with
IsPrimarytrue — so on a desktop, mouse-only games look identical to
the pre-pointer code. Additional active touches follow at indices 1..N; each carries
its own Id (the touch's fingerId) so consumers that care about
multi-touch can track a single finger across frames.
The mouse pointer is always present (so a mouse-only game sees
GetPointerCount() == 1 every frame, with IsDown reflecting whether the
left button is held). Touch pointers only appear while their finger is on the screen.
Fields¶
Pointer.Id Field¶
Stable per-finger ID for touches; -1 for the mouse pointer.
Field Value¶
Pointer.IsDown Field¶
True while the pointer is in contact (mouse left button held; touch in progress).
Field Value¶
Pointer.IsPrimary Field¶
The mouse pointer is always primary. The first active touch is also flagged primary so touch-only consumers have a stable "current" pointer to drive single-pointer UI without branching on input source.
Field Value¶
Pointer.Position Field¶
Screen-pixel position with the same Y convention as GetMousePosition()
(origin at bottom-left, or top-left if the provider was constructed with
flipInputY). Layout-space conversion is the caller's responsibility, identical to
how mouse position is handled today.
Field Value¶
Pointer.WasPressedThisFrame Field¶
True on the frame the press began (mouse left-button-down; touch began).
Field Value¶
Pointer.WasReleasedThisFrame Field¶
True on the frame the contact ended (mouse left-button-up; touch ended / cancelled).