public void UnregisterReceiver(UITooltipReceiver obj) { obj.onEnter -= OnPointerEnter; obj.onExit -= OnPointerExit; obj.onDown -= OnPointerDown; obj.onUp -= OnPointerUp; }
public void RegisterReceiver(UITooltipReceiver obj) { obj.onEnter += OnPointerEnter; obj.onExit += OnPointerExit; obj.onDown += OnPointerDown; obj.onUp += OnPointerUp; }
private void OnExit(UITooltipReceiver arg1, PointerEventData arg2) { //if (arg2.pointerCurrentRaycast.screenPosition != screenPosition) // return; _engaged = false; onDisengaged.Invoke(); }
private void OnDown(UITooltipReceiver arg1, PointerEventData arg2) { if (arg2.pointerCurrentRaycast.screenPosition != screenPosition) { return; } downState = true; if (_engaged) { onDisengaged.Invoke(); } }
private void OnUp(UITooltipReceiver arg1, PointerEventData arg2) { if (arg2.pointerCurrentRaycast.screenPosition != screenPosition) { return; } downState = false; if (_engaged && enabled) { SetPivot(); SetAnchoredPosition(); onEngaged.Invoke(); } }
private void OnEnter(UITooltipReceiver arg1, PointerEventData arg2) { if (arg2.dragging || arg2.pointerCurrentRaycast.screenPosition != screenPosition) { return; } _engaged = true; SetPivot(); SetAnchoredPosition(); if (!downState) { onEngaged.Invoke(); } if (arg1 != _receiver) { _receiver = arg1; onReceiverChanged.Invoke(_receiver); } }
private void OnPointerUp(UITooltipReceiver receiver, PointerEventData eventData) { onUp?.Invoke(receiver, eventData); }
private void OnPointerDown(UITooltipReceiver receiver, PointerEventData eventData) { onDown?.Invoke(receiver, eventData); }