public override void Event(UiEvent ev) { var rect = new RectangleF(Position.X, Position.Y - Height - 25, Width, Height); if (ev is UiMouseEvent mev) { var r = rect.Contains(mev.Position); if (!r) { return; } if (Items.Any()) { if (mev.Position.X > (rect.Left + rect.Width - 60)) { Items.RemoveAt(hoveredItemIndex); ev.Handled = true; } else if (mev.Position.X < (rect.Left + 30)) { Items[hoveredItemIndex].Done = !Items[hoveredItemIndex].Done; ev.Handled = true; } } } }
public virtual void Event(UiEvent ev) { }