Ejemplo n.º 1
0
        public IEnumerable <View> HitTest(PointF p)
        {
            foreach (var view in _subviews.HitTest(p))
            {
                yield return(view);
            }

            if (HitTestSelf(p))
            {
                yield return(this);
            }
        }
Ejemplo n.º 2
0
        public bool HandleGestureSample(GestureSample gestureSample, GameTime gameTime)
        {
            bool handled  = false;
            var  position = new PointF(gestureSample.Position.X, gestureSample.Position.Y);

            foreach (var view in _views.HitTest(position))
            {
                if (view.HandleGestureSample(gestureSample, gameTime))
                {
                    handled = true;
                    break;
                }
            }

            return(handled);
        }