Пример #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));
         }
     }
 }
Пример #3
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     OuyaInputMapper.init(this.Handle);
 }
Пример #4
0
 protected override void OnDestroy()
 {
     OuyaInputMapper.shutdown(this.Handle);
     base.OnDestroy();
 }