Java Code Examples for org.lwjgl.input.Keyboard#KEY_L

The following examples show how to use org.lwjgl.input.Keyboard#KEY_L . 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: ClientProxy.java    From Levels with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void init()
{
	keyBindingL = new KeyBinding("key.gui.weapon_interface", Keyboard.KEY_L, "key.levels");
	
	ClientRegistry.registerKeyBinding(keyBindingL);
}
 
Example 2
Source File: FriendsKeybind.java    From Hyperium with GNU Lesser General Public License v3.0 4 votes vote down vote up
public FriendsKeybind() {
    super("Friends", Keyboard.KEY_L);
}
 
Example 3
Source File: Example13_1.java    From LWJGL-OpenGL-Tutorials with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void keyPressed(int key, char c) {
	switch(key) {
		case Keyboard.KEY_P:
			sphereTimer.togglePause();
			break;
		case Keyboard.KEY_MINUS:
			sphereTimer.rewind(0.5f);
			break;
		case Keyboard.KEY_EQUALS:
			sphereTimer.fastForward(0.5f);
			break;
		case Keyboard.KEY_T:
			drawCameraPos = !drawCameraPos;
			break;
		case Keyboard.KEY_G:
			drawLights = !drawLights;
			break;
		case Keyboard.KEY_1:
			drawImpostor[0] = !drawImpostor[0];
			break;
		case Keyboard.KEY_2:
			drawImpostor[1] = !drawImpostor[1];
			break;
		case Keyboard.KEY_3:
			drawImpostor[2] = !drawImpostor[2];
			break;
		case Keyboard.KEY_4:
			drawImpostor[3] = !drawImpostor[3];
			break;
		case Keyboard.KEY_L:
			currentImpostor = Impostors.BASIC;
			break;
		case Keyboard.KEY_J:
			currentImpostor = Impostors.PERSPECTIVE;
			break;
		case Keyboard.KEY_H:
			currentImpostor = Impostors.DEPTH;
			break;
	}
}
 
Example 4
Source File: Example12_3.java    From LWJGL-OpenGL-Tutorials with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void keyPressed(int key, char c) {
	switch(key) {
		case Keyboard.KEY_P:
			lights.togglePause(timerMode);
			break;
		case Keyboard.KEY_MINUS:
			lights.rewindTime(timerMode, 1);
			break;
		case Keyboard.KEY_EQUALS:
			lights.fastForwardTime(timerMode, 1);
			break;
		case Keyboard.KEY_T:
			drawCameraPos = !drawCameraPos;
			break;
		case Keyboard.KEY_1:
			timerMode = TimerTypes.TIMER_ALL;
			System.out.println("All");
			break;
		case Keyboard.KEY_2:
			timerMode = TimerTypes.TIMER_SUN;
			System.out.println("Sun");
			break;
		case Keyboard.KEY_3:
			timerMode = TimerTypes.TIMER_LIGHTS;
			System.out.println("Lights");
			break;
		case Keyboard.KEY_L:
			if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT))
				setupGammaLighting();
			else
				setupHDRLighting();
			break;
		case Keyboard.KEY_K:
			isGammaCorrect = !isGammaCorrect;
			if(isGammaCorrect)
				System.out.println("Gamma on!");
			else
				System.out.println("Gamma off!");
			break;
		case Keyboard.KEY_Y:
			gammaValue += 0.1f;
			System.out.println("Gamma: " + gammaValue);
			break;
		case Keyboard.KEY_H:
			gammaValue -= 0.1f;
			if(gammaValue < 1f)
				gammaValue = 1;
			System.out.println("Gamma: " + gammaValue);
			break;
		case Keyboard.KEY_SPACE:
			float sunAlpha = lights.getSunTime();
			float sunTimeHours = sunAlpha * 24 + 12;
			sunTimeHours = sunTimeHours > 24 ? sunTimeHours - 24 : sunTimeHours;
			int sunHours = (int)sunTimeHours;
			float sunTimeMinutes = (sunTimeHours - sunHours) * 60f;
			int sunMinutes = (int)sunTimeMinutes;
			System.out.println(sunHours + ":" + sunMinutes);
			break;
	}
}
 
Example 5
Source File: Example12_1.java    From LWJGL-OpenGL-Tutorials with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void keyPressed(int key, char c) {
	switch(key) {
		case Keyboard.KEY_P:
			lights.togglePause(timerMode);
			break;
		case Keyboard.KEY_MINUS:
			lights.rewindTime(timerMode, 1);
			break;
		case Keyboard.KEY_EQUALS:
			lights.fastForwardTime(timerMode, 1);
			break;
		case Keyboard.KEY_T:
			drawCameraPos = !drawCameraPos;
			break;
		case Keyboard.KEY_1:
			timerMode = TimerTypes.TIMER_ALL;
			System.out.println("All");
			break;
		case Keyboard.KEY_2:
			timerMode = TimerTypes.TIMER_SUN;
			System.out.println("Sun");
			break;
		case Keyboard.KEY_3:
			timerMode = TimerTypes.TIMER_LIGHTS;
			System.out.println("Lights");
			break;
		case Keyboard.KEY_L:
			if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT))
				setupNighttimeLighting();
			else
				setupDaytimeLighting();
			break;
		case Keyboard.KEY_SPACE:
			float sunAlpha = lights.getSunTime();
			float sunTimeHours = sunAlpha * 24 + 12;
			sunTimeHours = sunTimeHours > 24 ? sunTimeHours - 24 : sunTimeHours;
			int sunHours = (int)sunTimeHours;
			float sunTimeMinutes = (sunTimeHours - sunHours) * 60f;
			int sunMinutes = (int)sunTimeMinutes;
			System.out.println(sunHours + ":" + sunMinutes);
			break;
	}
}
 
Example 6
Source File: Example12_2.java    From LWJGL-OpenGL-Tutorials with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void keyPressed(int key, char c) {
	switch(key) {
		case Keyboard.KEY_P:
			lights.togglePause(timerMode);
			break;
		case Keyboard.KEY_MINUS:
			lights.rewindTime(timerMode, 1);
			break;
		case Keyboard.KEY_EQUALS:
			lights.fastForwardTime(timerMode, 1);
			break;
		case Keyboard.KEY_T:
			drawCameraPos = !drawCameraPos;
			break;
		case Keyboard.KEY_1:
			timerMode = TimerTypes.TIMER_ALL;
			System.out.println("All");
			break;
		case Keyboard.KEY_2:
			timerMode = TimerTypes.TIMER_SUN;
			System.out.println("Sun");
			break;
		case Keyboard.KEY_3:
			timerMode = TimerTypes.TIMER_LIGHTS;
			System.out.println("Lights");
			break;
		case Keyboard.KEY_L:
			if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT))
				setupNighttimeLighting();
			else
				setupDaytimeLighting();
			break;
		case Keyboard.KEY_K:
			setupHDRLighting();
			break;
		case Keyboard.KEY_SPACE:
			float sunAlpha = lights.getSunTime();
			float sunTimeHours = sunAlpha * 24 + 12;
			sunTimeHours = sunTimeHours > 24 ? sunTimeHours - 24 : sunTimeHours;
			int sunHours = (int)sunTimeHours;
			float sunTimeMinutes = (sunTimeHours - sunHours) * 60f;
			int sunMinutes = (int)sunTimeMinutes;
			System.out.println(sunHours + ":" + sunMinutes);
			break;
	}
}