public bool OnUpdate() { IsHover = IsHover ? OnLeave(NodeMarkupTool.MouseRay) : HoverBounds.IntersectRay(NodeMarkupTool.MouseRay); if (IsHover) { HoverPoint = PointsBounds.FirstOrDefault(p => p.Value.IntersectRay(NodeMarkupTool.MouseRay)).Key; } return(IsHover); }
public virtual void OnMouseLeft(MouseEventArgs e) { if (Enabled && Hovered) { if (!HoverBounds.Contains(e.Position)) { Hovered = false; UpdateStyle(); MouseLeft?.Invoke(this, EventArgs.Empty); } } }
public virtual void OnMouseEntered(MouseEventArgs e) { if (Enabled && !Hovered) { if (HoverBounds.Contains(e.Position)) { Hovered = true; if (HoveredStyle != null) { UpdateStyle(); } MouseEntered?.Invoke(this, EventArgs.Empty); } } }