Version: 2020.3

Clickable

class in UnityEngine.UIElements

/

继承自:UIElements.PointerManipulator

切换到手册

描述

操控器,用于在点击元素时跟踪元素的鼠标事件和回调。

变量

activeThis property tracks the activation of the manipulator. Set it to true when the manipulator is activated.
lastMousePositionSpecifies the mouse position saved during the last mouse event on the target Element.

构造函数

Clickable构造函数。

受保护的函数

InvokeInvokes a click action.
OnMouseDownThis method is called when a MouseDownEvent is sent to the target element.
OnMouseMoveThis method is called when a MouseMoveEvent is sent to the target element.
OnMouseUpThis method is called when a MouseUpEvent is sent to the target element.
ProcessDownEventThis method processes the down event sent to the target Element.
ProcessMoveEventThis method processes the move event sent to the target Element.
ProcessUpEventThis method processes the up event sent to the target Element.
RegisterCallbacksOnTarget调用以在目标元素上注册鼠标事件回调。
UnregisterCallbacksFromTarget调用以从目标元素取消注册单击事件回调。

Events

clicked单击目标元素时触发的回调。
clickedWithEventInfo单击目标元素时触发的回调。

继承的成员

变量

target被操作的 VisualElement。
activatorsActivationfilters 列表。

受保护的函数

CanStartManipulationChecks whether MouseEvent satisfies all of the ManipulatorActivationFilter requirements.
CanStopManipulationChecks whether the MouseEvent is related to this Manipulator.
CanStartManipulationChecks whether PointerEvent satisfies all of the ManipulatorActivationFilter requirements.
CanStopManipulationChecks whether the PointerEvent is related to this Manipulator.