当前位置: 首页>>代码示例>>Java>>正文


Java Keyboard.KEY_M属性代码示例

本文整理汇总了Java中org.lwjgl.input.Keyboard.KEY_M属性的典型用法代码示例。如果您正苦于以下问题:Java Keyboard.KEY_M属性的具体用法?Java Keyboard.KEY_M怎么用?Java Keyboard.KEY_M使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.lwjgl.input.Keyboard的用法示例。


在下文中一共展示了Keyboard.KEY_M属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerKeys

@Override
public void registerKeys()
{
    openGuiKey = new KeyBinding("minetogether.key.friends", Keyboard.KEY_M, "minetogether.keys");
    Minecraft.getMinecraft().gameSettings.keyBindings = ArrayUtils.add(Minecraft.getMinecraft().gameSettings.keyBindings, openGuiKey);
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:6,代码来源:Client.java

示例2: registerKeys

@Override
public void registerKeys()
{
    openGuiKey = new KeyBinding("minetogether.key.friends", KeyConflictContext.UNIVERSAL, KeyModifier.CONTROL, Keyboard.KEY_M, "minetogether.keys");
    ClientRegistry.registerKeyBinding(openGuiKey);
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:6,代码来源:Client.java

示例3: update

public void update() {
	draw();
	editorUI.drawString(WIDTH + 3, HEIGHT / 2, "Press 's' to");
	editorUI.drawString(WIDTH + 3, HEIGHT / 2 + 20, "save this");
	editorUI.drawString(WIDTH + 3, HEIGHT / 2 + 40, "map!");
	editorUI.drawString(WIDTH + 3, HEIGHT / 2 + 80, "Press 'm' to");
	editorUI.drawString(WIDTH + 3, HEIGHT / 2 + 100, "return to");
	editorUI.drawString(WIDTH + 3, HEIGHT / 2 + 120, "the menu!");
	
	// Mouse Input
	if (Mouse.next()){
		boolean mouseClicked = Mouse.isButtonDown(0);
		if (mouseClicked) {
			if (tilePickerMenu.isButtonClicked("Grass")) {
				index = 0;
			} else if (tilePickerMenu.isButtonClicked("Dirt")){
				index = 1;
			} else if (tilePickerMenu.isButtonClicked("Water")) {
				index = 2;
			} else if (tilePickerMenu.isButtonClicked("DirtStone")) {
				index = 3;
			} else if (tilePickerMenu.isButtonClicked("StoneFloor")) {
				index = 4;
			} else if (tilePickerMenu.isButtonClicked("Sand")) {
				index = 5;
			} else if (tilePickerMenu.isButtonClicked("Crystal")) {
				index = 6;
			} else {
				if (Mouse.getX() < WIDTH)
					setTile();
			}
		}
	}

	// Keyboard Input
	while (Keyboard.next()) {
		if (Keyboard.getEventKey() == Keyboard.KEY_S && Keyboard.getEventKeyState()) {
			SaveMap(MAP_NAME, grid);
			StateManager.checkMap = 0;
		}
		if (Keyboard.getEventKey() == Keyboard.KEY_M && Keyboard.getEventKeyState()) {
			StateManager.setState(GameState.MAINMENU);
		}
	}
}
 
开发者ID:imaTowan,项目名称:Towan,代码行数:45,代码来源:Editor.java


注:本文中的org.lwjgl.input.Keyboard.KEY_M属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。