/// <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); }
/// <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)); }
/// <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(); }
public void OnPointerExit(PointerEventData eventData) { if (MouseExit != null) { MouseExit.Invoke(this, eventData); } }
private void OnMouseExit() { this.isHovered = false; OnPointerExit(); MouseExit?.Invoke(); if (this.showTooltip) { ObjectTooltip.Instance.Hide(); } }
public void OnMouseExit() { MouseExit?.Invoke(this, new EventArgs()); }
private void OnMouseExit() { MouseExit.Invoke(); }
protected override void OnCursorExit() => MouseExit?.Invoke(this, EventArgs.Empty);
private void OnMouseExit() { MouseExit?.Invoke(this, EventArgs.Empty); }
private void OnMouseLeave() { MouseExit?.Invoke(this, new MouseClickEventArgs(-1)); lastMouseOver = null; }
internal void DispatchMouseExit(Point mousePosition) { MouseExit?.Invoke(this, mousePosition); }
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); }
private void OnMouseExit() { //int d = (Text.text == ">2") ? 3 : int.Parse(Text.text); MouseExit?.Invoke(); }