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


Java Keys.F12属性代码示例

本文整理汇总了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;
}
 
开发者ID:MMORPG-Prototype,项目名称:MMORPG_Prototype,代码行数:16,代码来源:PlayInputSingleHandle.java

示例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;
}
 
开发者ID:eskalon,项目名称:ProjektGG,代码行数:12,代码来源:GameInputProcessor.java

示例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;
}
 
开发者ID:libgdx-jam,项目名称:GDXJam,代码行数:55,代码来源:InputSystem.java


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