Exemplo n.º 1
0
        private bool checkScrollIntersection()
        {
            IOnScreenOptimisingContainer scroll = null;
            CompositeDrawable            cursor = this;

            while (scroll == null && (cursor = cursor.Parent) != null)
            {
                scroll = cursor as IOnScreenOptimisingContainer;
            }

            return(scroll?.ScreenSpaceDrawQuad.Intersects(ScreenSpaceDrawQuad) ?? true);
        }
Exemplo n.º 2
0
        private void computeIsIntersecting()
        {
            if (OptimisingContainer == null)
            {
                CompositeDrawable cursor = this;
                while (OptimisingContainer == null && (cursor = cursor.Parent) != null)
                {
                    OptimisingContainer = cursor as IOnScreenOptimisingContainer;
                }
            }

            if (OptimisingContainer == null)
            {
                IsIntersecting = true;
            }
            else
            {
                OptimisingContainer.ScheduleCheckAction(() => IsIntersecting = OptimisingContainer.ScreenSpaceDrawQuad.Intersects(ScreenSpaceDrawQuad));
            }
        }