本文整理匯總了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);
}
}
}