Пример #1
0
        /// <summary>
        /// Raises the <see cref="MouseExit"/> event.
        /// </summary>
        /// <param name="state">Current mouse state in relation to this console.</param>
        protected virtual void OnMouseExit(MouseScreenObjectState state)
        {
            // Force mouse off just in case
            IsMouseOver = false;

            MouseExit?.Invoke(this, state);
        }
Пример #2
0
        /// <summary>
        /// Raises the <see cref="MouseExit"/> event.
        /// </summary>
        /// <param name="state">Current mouse state in relation to this console.</param>
        protected virtual void OnMouseExit(MouseConsoleState state)
        {
            // Force mouse off just in case
            IsMouseOver = false;

            MouseExit?.Invoke(this, new MouseEventArgs(state));
        }
Пример #3
0
        /// <summary>
        /// Called when the mouse exits the area of the control. Raises the MouseExit event and calls the <see cref="DetermineAppearance"/> method.
        /// </summary>
        /// <param name="state">The current mouse data</param>
        protected virtual void OnMouseExit(Input.MouseConsoleState state)
        {
            isMouseOver = false;
            MouseExit?.Invoke(this, new MouseEventArgs(state));

            DetermineAppearance();
        }
Пример #4
0
 public void OnPointerExit(PointerEventData eventData)
 {
     if (MouseExit != null)
     {
         MouseExit.Invoke(this, eventData);
     }
 }
Пример #5
0
        private void OnMouseExit()
        {
            this.isHovered = false;

            OnPointerExit();

            MouseExit?.Invoke();

            if (this.showTooltip)
            {
                ObjectTooltip.Instance.Hide();
            }
        }
Пример #6
0
 public void OnMouseExit()
 {
     MouseExit?.Invoke(this, new EventArgs());
 }
Пример #7
0
 private void OnMouseExit()
 {
     MouseExit.Invoke();
 }
Пример #8
0
 protected override void OnCursorExit() => MouseExit?.Invoke(this, EventArgs.Empty);
Пример #9
0
 private void OnMouseExit()
 {
     MouseExit?.Invoke(this, EventArgs.Empty);
 }
Пример #10
0
 private void OnMouseLeave()
 {
     MouseExit?.Invoke(this, new MouseClickEventArgs(-1));
     lastMouseOver = null;
 }
Пример #11
0
 internal void DispatchMouseExit(Point mousePosition)
 {
     MouseExit?.Invoke(this, mousePosition);
 }
Пример #12
0
        internal bool HandledMouseMove()
        {
            if (!Visible || !enabled)
            {
                return(false);
            }

            var mousePos       = Input.Manager.MousePosition;
            var globalPosition = GlobalPosition;

            if (!(
                    mousePos.X >= globalPosition.X && mousePos.X <= globalPosition.X + Size.X &&
                    mousePos.Y >= globalPosition.Y && mousePos.Y <= globalPosition.Y + Size.Y
                    ))
            {
                if (MouseInBounds)
                {
                    MouseInBounds     = false;
                    MouseDirectlyOver = false;

                    if (RegisterEventTypes.HasFlag(EventType.MouseEnterExit))
                    {
                        OnMouseExit();
                        MouseExit?.Invoke(this, EventArgs.Empty);
                    }
                }

                return(false);
            }

            var ret = false;

            MouseDirectlyOver = true;

            if (!MouseInBounds)
            {
                MouseInBounds = true;

                if (RegisterEventTypes.HasFlag(EventType.MouseEnterExit))
                {
                    OnMouseEnter();
                    MouseEnter?.Invoke(this, EventArgs.Empty);
                    ret = true;
                }
            }

            for (var index = children.Count - 1; index >= 0; --index)
            {
                if (children[index].HandledMouseMove())
                {
                    if (MouseDirectlyOver)
                    {
                        MouseDirectlyOver = false;
                    }

                    return(true);
                }
            }

            return(ret);
        }
Пример #13
0
 private void OnMouseExit()
 {
     //int d = (Text.text == ">2") ? 3 : int.Parse(Text.text);
     MouseExit?.Invoke();
 }