com.watabou.input.Keys.Key Java Examples

The following examples show how to use com.watabou.input.Keys.Key. 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();
}