本文整理汇总了Java中com.badlogic.gdx.Input.Keys.F12属性的典型用法代码示例。如果您正苦于以下问题:Java Keys.F12属性的具体用法?Java Keys.F12怎么用?Java Keys.F12使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.Input.Keys
的用法示例。
在下文中一共展示了Keys.F12属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: keyDown
@Override
public boolean keyDown(int keycode)
{
if(shouldAvoidInput())
return false;
ActorManipulator dialogs = userInterface.getDialogs();
if (dialogs.isMapped(keycode))
dialogs.showOrHide(keycode);
else if (keycode >= Keys.NUM_1 && keycode <= Keys.NUM_9)
spellQuickAccessAction(keycode - Keys.NUM_1);
else if (keycode >= Keys.F1 && keycode <= Keys.F12)
itemQuickAccessAction(keycode - Keys.F1);
return false;
}
示例2: keyDown
@Override
public boolean keyDown(int keycode) {
if (keycode == Keys.F12) {
Gdx.app.debug("Input", "Screenshot taken");
ScreenshotUtils.takeScreenshot();
}
if (inputProcessor != null)
return inputProcessor.keyDown(keycode);
return false;
}
示例3: keyDown
@Override
public boolean keyDown (int keycode) {
boolean clearSelection = false;
boolean appendSelection = true;
if (Gdx.input.isKeyPressed(Keybinds.SELECTION_DECREASE))
appendSelection = false;
else if (!Gdx.input.isKeyPressed(Keybinds.SELECTION_INCREASE)) clearSelection = true;
switch (keycode) {
// Keybindings for selecting squads
case Keybinds.SQUAD0:
case Keybinds.SQUAD1:
case Keybinds.SQUAD2:
case Keybinds.SQUAD3:
case Keybinds.SQUAD4:
if (clearSelection) clearSelected();
setSelected(keybindIndices.get(keycode), appendSelection);
return true;
// Keybindings for selecting formation patterns
case Keybinds.FORMATION0:
case Keybinds.FORMATION1:
case Keybinds.FORMATION2:
case Keybinds.FORMATION3:
case Keybinds.FORMATION4:
case Keybinds.FORMATION5:
FormationPatternType pattern = FormationPatternType.values()[keybindIndices.get(keycode)];
setFormationPattern(pattern);
return true;
case Keybinds.TATICS_TOGGLE:
// TODO INPUT: toggle the tatical state of the squad
return true;
case Keys.SPACE:
// TODO INPUT: move camera to squad
return true;
case Keys.F12:
if (Gdx.app.getType() == ApplicationType.Desktop) {
// NOTE: Comment this out to run GWT
// ScreenshotFactory.saveScreenshot();
}
return true;
case Keys.ESCAPE:
GameManager.pause();
PauseDialog dialog = new PauseDialog(Assets.skin);
dialog.show(guiSystem.getStage());
return true;
}
return false;
}