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

The following examples show how to use com.watabou.input.Keys#VOLUME_UP . 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: Game.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onKeyDown( int keyCode, KeyEvent event ) {
	
	if (keyCode == Keys.VOLUME_DOWN || 
		keyCode == Keys.VOLUME_UP) {
		
		return false;
	}
	
	synchronized (motionEvents) {
		keysEvents.add( event );
	}
	return true;
}
 
Example 2
Source File: Game.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onKeyUp( int keyCode, KeyEvent event ) {
	
	if (keyCode == Keys.VOLUME_DOWN || 
		keyCode == Keys.VOLUME_UP) {
		
		return false;
	}
	
	synchronized (motionEvents) {
		keysEvents.add( event );
	}
	return true;
}
 
Example 3
Source File: Game.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {

    if (keyCode == Keys.VOLUME_DOWN || keyCode == Keys.VOLUME_UP) {
        return super.onKeyUp(keyCode, event);
    }

    synchronized (keysEvents) {
        keysEvents.add(event);
    }
    return true;
}
 
Example 4
Source File: Game.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {

    if (keyCode == Keys.VOLUME_DOWN || keyCode == Keys.VOLUME_UP) {
        return super.onKeyUp(keyCode, event);
    }

    synchronized (keysEvents) {
        keysEvents.add(event);
    }
    return true;
}
 
Example 5
Source File: Game.java    From PD-classes with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onKeyDown( int keyCode, KeyEvent event ) {
	
	if (keyCode == Keys.VOLUME_DOWN || 
		keyCode == Keys.VOLUME_UP) {
		
		return false;
	}
	
	synchronized (motionEvents) {
		keysEvents.add( event );
	}
	return true;
}
 
Example 6
Source File: Game.java    From PD-classes with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onKeyUp( int keyCode, KeyEvent event ) {
	
	if (keyCode == Keys.VOLUME_DOWN || 
		keyCode == Keys.VOLUME_UP) {
		
		return false;
	}
	
	synchronized (motionEvents) {
		keysEvents.add( event );
	}
	return true;
}