Beispiel #1
0
 @Override
 protected void processTouch(TouchEvent touch) {
   super.processTouch(touch);
   if (getMessage() != null) {
     return;
   }
   if (touch.type == TouchEvent.TOUCH_DOWN && touch.pointer == 0) {
     startX = touch.x;
     startY = lastY = touch.y;
   }
   if (touch.type == TouchEvent.TOUCH_DRAGGED && touch.pointer == 0) {
     if (touch.x > (1920 - NavigationBar.SIZE)) {
       return;
     }
     yPosition += lastY - touch.y;
     if (yPosition < 0) {
       yPosition = 0;
     }
     if (yPosition > maxY) {
       yPosition = maxY;
     }
     lastY = touch.y;
   }
   if (touch.type == TouchEvent.TOUCH_UP && touch.pointer == 0) {
     if (Math.abs(startX - touch.x) < 20 && Math.abs(startY - touch.y) < 20) {
       if (done.isTouched(touch.x, touch.y)) {
         assignState((Alite) game);
         ((Alite) game).getNavigationBar().setActive(true);
         ((Alite) game).getNavigationBar().setActiveIndex(2);
         newScreen = new StatusScreen(game);
         SoundManager.play(Assets.click);
       } else {
         for (int i = 0; i < 256; i++) {
           Button b = values[i];
           b.setSelected(false);
           if (b.isTouched(touch.x, touch.y)) {
             b.setSelected(true);
             if ((i % 16) < 8) {
               newScreen = new HexNumberPadScreen(this, game, 975, 180, i);
             } else {
               newScreen = new HexNumberPadScreen(this, game, 60, 180, i);
             }
             SoundManager.play(Assets.click);
           }
         }
       }
     }
   }
   if (touch.type == TouchEvent.TOUCH_SWEEP) {
     deltaY = touch.y2;
   }
 }
Beispiel #2
0
 @Override
 public void resume() {
   super.resume();
 }
Beispiel #3
0
 @Override
 public void pause() {
   super.pause();
 }
Beispiel #4
0
 @Override
 public void loadAssets() {
   super.loadAssets();
 }
Beispiel #5
0
 @Override
 public void dispose() {
   super.dispose();
 }