Java Code Examples for com.watabou.input.Keys#BACK

The following examples show how to use com.watabou.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: Window.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSignal( Key key ) {
	if (key.pressed) {
		switch (key.code) {
		case Keys.BACK:
			onBackPressed();			
			break;
		case Keys.MENU:
			onMenuPressed();			
			break;
		}
	}
	
	Keys.event.cancel();
}
 
Example 2
Source File: Window.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSignal( Key key ) {
	if (key.pressed) {
		switch (key.code) {
		case Keys.BACK:
			onBackPressed();
			break;
		case Keys.MENU:
			onMenuPressed();
			break;
		}
	}
	
	Keys.event.cancel();
}
 
Example 3
Source File: Window.java    From pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSignal( Key key ) {
	if (key.pressed) {
		switch (key.code) {
		case Keys.BACK:
			onBackPressed();			
			break;
		case Keys.MENU:
			onMenuPressed();			
			break;
		}
	}
	
	Keys.event.cancel();
}
 
Example 4
Source File: Window.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSignal( Key key ) {
	if (key.pressed) {
		switch (key.code) {
		case Keys.BACK:
			onBackPressed();			
			break;
		case Keys.MENU:
			onMenuPressed();			
			break;
		}
	}
	
	Keys.event.cancel();
}