Lar brukeren bytte mellom kortvelgingsskjermen og brettet

This commit is contained in:
Kristian Knarvik 2020-04-20 18:18:36 +02:00
parent 8b6b2f1d9b
commit 7552c983ae
2 changed files with 11 additions and 0 deletions

View File

@ -103,6 +103,8 @@ public class BoardActiveScreen extends AbstractScreen implements InputProcessor
roboRallyWrapper.roboRallyGame = debugGame;
this.debugGame = temp;
return true;
} else if (keyCode == Input.Keys.TAB && roboRallyWrapper.roboRallyGame.getGameState() == GameState.CHOOSING_CARDS) {
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getCardChoiceScreen(roboRallyWrapper));
}
return false;
}

View File

@ -1,6 +1,7 @@
package inf112.fiasko.roborally.gamewrapper.screens;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.Screen;
@ -160,6 +161,14 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
stage.draw();
}
@Override
public boolean keyUp(int keyCode) {
if (keyCode == Input.Keys.TAB) {
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(roboRallyWrapper));
}
return false;
}
/**
* Renders the base shape of cards
*/