private void OnPointerUp(int id)
        {
            var position = WindowSystemInput.GetPointerPosition();

            this.currentData.pointerPress = EventSystem.current.currentSelectedGameObject;
            this.currentData.position     = new Vector2(position.x, position.y);
            this.OnPointerClick(this.currentData);
        }
        protected virtual bool ValidateHoverPointer()
        {
            if (this.hoverIsActive == false)
            {
                return(false);
            }
            if (this.hoverOnAnyPointerState == false && WindowSystemInput.GetPointerState() != PointerState.Default)
            {
                return(false);
            }

            return(true);
        }
        private bool ValidateHoverPointer_INTERNAL()
        {
            if (this.hoverIsActive == false)
            {
                return(false);
            }
            if (this.hoverOnAnyButtonState == false && this.IsInteractable() == false)
            {
                return(false);
            }
            if (this.hoverOnAnyPointerState == false && WindowSystemInput.GetPointerState() != PointerState.Default)
            {
                return(false);
            }

            return(true);
        }
        private bool ValidateHoverPointer(PointerEventData eventData)
        {
            if (this.hoverIsActive == false)
            {
                return(false);
            }
            if (this.button != null && this.hoverOnAnyButtonState == false && this.button.interactable == false)
            {
                return(false);
            }
            if (this.hoverOnAnyPointerState == false && WindowSystemInput.GetPointerState() != PointerState.Default)
            {
                return(false);
            }

            return(true);
        }
        public static void Put(IHeatmapHandler component)
        {
            var wComp = component as WindowComponent;

            var corners = new Vector3[4];

            (wComp.transform as RectTransform).GetWorldCorners(corners);

            var leftBottom = HeatmapSystem.GetScreenPoint(wComp, corners[0]);
            //var topRight = HeatmapSystem.GetScreenPoint(wComp, corners[2]);

            var inputPosition = WindowSystemInput.GetPointerPosition();
            //var w = topRight.x - leftBottom.x;
            //var h = topRight.y - leftBottom.y;

            var pos = new Vector2(inputPosition.x - leftBottom.x, inputPosition.y - leftBottom.y);

            HeatmapSystem.Put(component, pos, ClickType.Component);
        }
 public static void Put()
 {
     HeatmapSystem.Put(null, WindowSystemInput.GetPointerPosition(), ClickType.Screen);
 }
Esempio n. 7
0
        protected override void Start()
        {
            base.Start();

            this.scrollSensitivity = WindowSystemInput.GetScrollSensitivity();
        }