ClientUICursorEventAreaControl
The type that represents an instance of a CursorEventArea component. Contains functions for managing cursor event listeners.
Methods5
function ClientUICursorEventAreaControl:AddCursorEventListener(eventType: EnumItem.CursorEventType, callback: fun(eventData: CursorEventData) -> nil)
Registers a cursor event listener to the Client Control.
See:
- Enum.CursorEventType for all cursor event types.
- CursorEventData
eventTypeEnumItem.CursorEventTypeThe cursor event type to listen for.
callbackfun(eventData: CursorEventData) -> nilThe callback function, which exposes data about the cursor event.
function ClientUICursorEventAreaControl:RemoveCursorEventListener(eventType: EnumItem.CursorEventType, callback: fun(eventData: CursorEventData) -> nil)
Removes the specified cursor event listener from the Client Control.
See:
- Enum.CursorEventType for all cursor event types.
- CursorEventData
eventTypeEnumItem.CursorEventTypeThe event type to remove the callback from.
callbackfun(eventData: CursorEventData) -> nilThe callback function to remove.
function ClientUICursorEventAreaControl:RemoveCursorEventListeners(eventType: EnumItem.CursorEventType)
Removes all cursor event listeners for the specified event type from the Client Control.
See:
- Enum.CursorEventType for all cursor event types.
eventTypeEnumItem.CursorEventTypeThe event type to clear listeners from.
function ClientUICursorEventAreaControl:RemoveAllCursorEventListeners()
Removes all cursor event listeners from the Client Control.
function ClientUICursorEventAreaControl:SimulateCursorClick()
Simulates the CursorDown, CursorUp, and CursorClick events in sequence.
Fields1
ClientUICursorEventAreaControl.raycastTarget : boolean
[Read/Write] Whether the Cursor Event Area can receive cursor interaction events.