Table of Contents

Class PointerCaptureOracle

Namespace
LansMap.Map.UI
Assembly
LansMap.Runtime.dll

Pointer-over-UI and keyboard-capture predicates against a live UI Toolkit panel or a Unity UI (Canvas) EventSystem, so map input can stand down when a widget or a text field owns the event instead.

public static class PointerCaptureOracle
Inheritance
object
PointerCaptureOracle

Methods

IsEditableText(VisualElement)

public static bool IsEditableText(VisualElement e)

Parameters

e VisualElement

Returns

bool

IsKeyboardCaptured(IPanel)

public static bool IsKeyboardCaptured(IPanel panel)

Parameters

panel IPanel

Returns

bool

IsKeyboardCapturedByUnityUi(EventSystem)

public static bool IsKeyboardCapturedByUnityUi(EventSystem eventSystem)

Parameters

eventSystem EventSystem

The live EventSystem; null answers false.

Returns

bool

IsPointerOverUi(IPanel, Vector2)

public static bool IsPointerOverUi(IPanel panel, Vector2 screenTopLeftPx)

Parameters

panel IPanel
screenTopLeftPx Vector2

Returns

bool

IsPointerOverUnityUi(EventSystem, Vector2)

True when a Unity UI (Canvas) raycaster reports a hit at the given screen position, so map input must stand down there.

public static bool IsPointerOverUnityUi(EventSystem eventSystem, Vector2 screenTopLeftPx)

Parameters

eventSystem EventSystem

The live EventSystem; null answers false.

screenTopLeftPx Vector2

Pointer position in screen px, top-left origin.

Returns

bool

True on any hit from any registered raycaster except a PhysicsRaycaster (or Physics2DRaycaster, which derives from it) collider hit - that is world content, not UI; canvases on a display other than 0 are not checked.