本文整理汇总了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);
}
示例2: registerKeys
@Override
public void registerKeys()
{
openGuiKey = new KeyBinding("minetogether.key.friends", KeyConflictContext.UNIVERSAL, KeyModifier.CONTROL, Keyboard.KEY_M, "minetogether.keys");
ClientRegistry.registerKeyBinding(openGuiKey);
}
示例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);
}
}
}