public virtual void OnPointerLeave(IGuiContext context, GuiPointerEventArgs args) { if (IsEnabled) { HoverStyle?.Revert(this); } }
public virtual bool OnPointerLeave(IGuiContext context, GuiPointerEventArgs args) { if (IsEnabled && _isHovering) { _isHovering = false; HoverStyle?.Revert(this); } return(true); }
public override bool OnPointerUp(IGuiContext context, PointerEventArgs args) { base.OnPointerUp(context, args); if (BoundingRectangle.Contains(args.Position)) { HoverStyle?.Revert(this); CheckedHoverStyle?.Revert(this); IsChecked = !IsChecked; if (IsChecked) { CheckedHoverStyle?.Apply(this); } else { HoverStyle?.Apply(this); } } return(true); }