private void CheckMouseOverUIControl() { Point mousePosition = Mouse.Position; _currentControl = null; for (int i = 0; i < _controls.Count; i++) { var control = _controls[i]; UIControl[] list = control.HitTest(mousePosition.X, mousePosition.Y); if (list != null && list.Length != 0) { _currentControl = list[0]; break; } } }
public void Remove(UIControl control) { _controls.Remove(control); }
public void Add(UIControl control) { _controls.Insert(0, control); }