Exemple #1
0
        private bool InternalIsPointOverGUI(Point p, Widget w)
        {
            if (!w.Visible || !w.BorderBounds.Contains(p))
            {
                return(false);
            }

            if (!w.FallsThrough(p))
            {
                return(true);
            }

            // If widget fell through, then it is Container for sure
            var asContainer = (Container)w;

            // Or if any child is solid
            foreach (var ch in asContainer.ChildrenCopy)
            {
                if (InternalIsPointOverGUI(p, ch))
                {
                    return(true);
                }
            }

            return(false);
        }