當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。