示例#1
0
        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;
                }
            }
        }
示例#2
0
 public void Remove(UIControl control)
 {
     _controls.Remove(control);
 }
示例#3
0
 public void Add(UIControl control)
 {
     _controls.Insert(0, control);
 }