コード例 #1
0
 public override bool DispatchGenericMotionEvent(MotionEvent motionEvent)
 {
     if (OuyaInputMapper.shouldHandleInputEvent(motionEvent.Handle))
     {
         return(OuyaInputMapper.DispatchGenericMotionEvent(this.Handle, motionEvent));
     }
     else
     {
         return(base.DispatchGenericMotionEvent(motionEvent));
     }
 }
コード例 #2
0
 public override bool DispatchKeyEvent(KeyEvent keyEvent)
 {
     if (OuyaInputMapper.shouldHandleInputEvent(keyEvent.Handle))
     {
         return(OuyaInputMapper.DispatchKeyEvent(this.Handle, keyEvent));
     }
     else
     {
         if (keyEvent.Action == KeyEventActions.Down)
         {
             return(OnKeyDown(keyEvent.KeyCode, keyEvent));
         }
         else if (keyEvent.Action == KeyEventActions.Up)
         {
             return(OnKeyUp(keyEvent.KeyCode, keyEvent));
         }
         else
         {
             return(base.DispatchKeyEvent(keyEvent));
         }
     }
 }