public virtual void Update(GameTime gameTime) { foreach (var i in ChildList.OrderBy(_ => _.Index).Reverse()) { i.Update(gameTime); } if (IsEventApplicable) { EventsManager.TrySet(this); } foreach (var i in EventDictionary.Where(_ => EventsHandler.HandleMouse(this, _.Key))) { if (i.Key == Event.CLICKOUTLEFT || i.Key == Event.MOUSEOVER || i.Key == Event.MOUSEOUT || EventsManager.IsValid(this)) { i.Value?.Invoke(this, new EventArgs()); } } }