本文整理了Java中com.badlogic.gdx.Input.setCatchMenuKey()
方法的一些代码示例,展示了Input.setCatchMenuKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.setCatchMenuKey()
方法的具体详情如下:
包路径:com.badlogic.gdx.Input
类名称:Input
方法名:setCatchMenuKey
[英]Sets whether the MENU button on Android should be caught. This will prevent the onscreen keyboard to show up. Will have no effect on the desktop.
[中]设置是否应捕获Android上的菜单按钮。这将阻止屏幕键盘显示。将不会对桌面产生任何影响。
代码示例来源:origin: libgdx/libgdx
@Override
public void setCatchMenuKey (boolean catchMenu) {
input.setCatchMenuKey(catchMenu);
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
public UI(World w) {
this.w = w;
recorder = new Recorder(w);
testerBot = new TesterBot(w);
batch = new SpriteBatch();
screens = new BladeScreen[Screens.values().length];
Gdx.input.setCatchMenuKey(true);
loadAssets();
screens[Screens.INIT_SCREEN.ordinal()] = getCustomScreenInstance(Screens.INIT_SCREEN.toString(),
InitScreen.class);
screens[Screens.SCENE_SCREEN.ordinal()] = getCustomScreenInstance(Screens.SCENE_SCREEN.toString(),
DefaultSceneScreen.class);
screens[Screens.LOADING_SCREEN.ordinal()] = getCustomScreenInstance(Screens.LOADING_SCREEN.toString(),
LoadingScreen.class);
screens[Screens.MENU_SCREEN.ordinal()] = getCustomScreenInstance(Screens.MENU_SCREEN.toString(),
MenuScreen.class);
screens[Screens.HELP_SCREEN.ordinal()] = getCustomScreenInstance(Screens.HELP_SCREEN.toString(),
HelpScreen.class);
screens[Screens.CREDIT_SCREEN.ordinal()] = getCustomScreenInstance(Screens.CREDIT_SCREEN.toString(),
CreditsScreen.class);
screens[Screens.LOAD_GAME_SCREEN.ordinal()] = getCustomScreenInstance(Screens.LOAD_GAME_SCREEN.toString(),
LoadSaveScreen.class);
screens[Screens.SAVE_GAME_SCREEN.ordinal()] = getCustomScreenInstance(Screens.SAVE_GAME_SCREEN.toString(),
LoadSaveScreen.class);
for (BladeScreen s : screens)
s.setUI(this);
setCurrentScreen(Screens.INIT_SCREEN);
}
内容来源于网络,如有侵权,请联系作者删除!