public void HandleInput(InputManager inputManager)
 {
     foreach (var item in _items)
     {
         item.Widget.HandleInput(inputManager);
     }
 }
 public virtual void HandleInput(InputManager touches)
 {
     if (!_inTouch && touches.Count > 0 && touches[0].State == TouchLocationState.Pressed)
     {
         var touch = touches[0];
         if (InActiveArea(touch.Position))
         {
             _touch = touch;
             _inTouch = true;
         }
     }
     else if (_inTouch)
     {
         TouchLocation touch;
         if (!touches.FindById(_touch.Id, out touch))
         {
             _inTouch = false;
             BeginUnhighlight();
         }
         else
         {
             if (touch.State == TouchLocationState.Released && InActiveArea(touch.Position))
             {
                 if (!touches.IsHandled(touch.Id))
                 {
                     OnOnTap();
                     touches.MarkAsHandled(touch.Id);
                 }
                 _inTouch = false;
                 BeginUnhighlight();
             }
             else
             {
                 if (InActiveArea(touch.Position))
                 {
                     BeginHighlight();
                 }
                 else
                 {
                     BeginUnhighlight();
                 }
             }
         }
     }
 }
 public void HandleInput(InputManager inputManager)
 {
     if (_startTouch == null)
     {
         if (inputManager.Count > 0 && inputManager[0].State == TouchLocationState.Pressed)
             _startTouch = inputManager[0];
     }
     else
     {
         TouchLocation touch;
         bool touchFound = inputManager.FindById(_startTouch.Value.Id, out touch);
         if (!touchFound)
             return;
         if (touch.State == TouchLocationState.Moved)
         {
             CurrentPageOffset = (touch.Position.X - _startTouch.Value.Position.X);
         }
         else
         {
             _startTouch = null;
             if (!InFlip)
             {
                 var isHandled = inputManager.IsHandled(touch.Id);
                 if (!isHandled && CurrentPageOffset < -TouchPanel.DisplayWidth * DragToFlipTheshold)
                 {
                     inputManager.MarkAsHandled(touch.Id);
                     BeginFlip(1);
                 }
                 else if (!isHandled && CurrentPageOffset > TouchPanel.DisplayWidth * DragToFlipTheshold)
                 {
                     inputManager.MarkAsHandled(touch.Id);
                     BeginFlip(-1);
                 }
                 else
                 {
                     BeginFlip(0);
                 }
             }
         }
     }
 }
 public Submenu1Screen()
 {
     _inputManager = new InputManager();
 }
 public MenuScreen()
 {
     _inputManager = new InputManager();
 }