| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEngine; |
| | 4 | | using UnityEngine.EventSystems; |
| | 5 | |
|
| | 6 | | public class UIElementMouseCapturer : EventTrigger { |
| 0 | 7 | | public override void OnPointerEnter(PointerEventData eventData) { |
| 0 | 8 | | InputManager.Instance.mouseActive = false; |
| 0 | 9 | | base.OnPointerEnter(eventData); |
| 0 | 10 | | } |
| | 11 | |
|
| 0 | 12 | | public override void OnPointerExit(PointerEventData eventData) { |
| 0 | 13 | | InputManager.Instance.mouseActive = true; |
| 0 | 14 | | base.OnPointerExit(eventData); |
| 0 | 15 | | } |
| | 16 | |
|
| 0 | 17 | | public void OnDisable() { |
| 0 | 18 | | OnPointerExit(null); |
| 0 | 19 | | } |
| | 20 | | } |