protected virtual void OnMouseClickCore(MouseClickEventArgs args) { if (args == null || args.Cancel) { return; } MouseClick?.Invoke(this, args); if (args.Cancel) { return; } foreach (var mouseClick in Renderables.OfType <ISupportMouseClick>()) { mouseClick.OnMouseClick(args); if (args.Cancel) { return; } } }
void ISupportMouseClick.OnMouseClick(MouseClickEventArgs args) => OnMouseClickCore(args);