Ejemplo n.º 1
0
 public override bool DispatchGenericMotionEvent(MotionEvent motionEvent)
 {
     if (OuyaInputMapper.shouldHandleInputEvent(motionEvent.Handle))
     {
         return(OuyaInputMapper.DispatchGenericMotionEvent(this.Handle, motionEvent));
     }
     else
     {
         return(base.DispatchGenericMotionEvent(motionEvent));
     }
 }
Ejemplo n.º 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));
         }
     }
 }
Ejemplo n.º 3
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     OuyaInputMapper.init(this.Handle);
 }
Ejemplo n.º 4
0
 protected override void OnDestroy()
 {
     OuyaInputMapper.shutdown(this.Handle);
     base.OnDestroy();
 }