Java Code Examples for com.badlogic.gdx.Input.Keys#BACK
The following examples show how to use
com.badlogic.gdx.Input.Keys#BACK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Sample.java From Codelabs with MIT License | 5 votes |
@Override public boolean keyDown(int keycode) { if (keycode == Keys.BACK || keycode == Keys.ESCAPE) { dispose(); Gdx.input.setCatchBackKey(false); ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu()); } return true; }
Example 2
Source File: HelpScreen.java From FruitCatcher with Apache License 2.0 | 5 votes |
@Override public boolean keyDown(int keycode) { if(keycode == Keys.BACK){ game.gotoMenuScreen(); } else if (keycode == Keys.UP && startLine > 0) { startLine--; } else if (keycode == Keys.DOWN && startLine < lastLineIndex) { startLine++; } return true; }
Example 3
Source File: MenuScreen.java From FruitCatcher with Apache License 2.0 | 5 votes |
@Override public boolean keyDown(int keycode) { if(keycode == Keys.BACK){ Gdx.app.exit(); return true; } return false; }
Example 4
Source File: LevelScreen.java From FruitCatcher with Apache License 2.0 | 5 votes |
@Override public boolean keyDown(int keycode) { if(keycode == Keys.BACK){ game.gotoMenuScreen(); } return true; }
Example 5
Source File: GameScreen.java From FruitCatcher with Apache License 2.0 | 5 votes |
@Override public boolean keyDown(int keycode) { if(keycode == Keys.BACK || keycode == Keys.BACKSPACE){ game.endGame(0); game.gotoMenuScreen(); } if(keycode == Keys.P) { pause(); } return true; }