本文整理了Java中com.badlogic.gdx.Graphics.isFullscreen()
方法的一些代码示例,展示了Graphics.isFullscreen()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphics.isFullscreen()
方法的具体详情如下:
包路径:com.badlogic.gdx.Graphics
类名称:Graphics
方法名:isFullscreen
[英]Whether the app is fullscreen or not
[中]应用程序是否全屏显示
代码示例来源:origin: 00-Evan/shattered-pixel-dungeon-gdx
public static boolean fullscreen() {
return getBoolean(KEY_WINDOW_FULLSCREEN, Gdx.graphics.isFullscreen());
}
代码示例来源:origin: MovingBlocks/DestinationSol
@Override
public void resize() {
//If the game has gone from full-screen to windowed
if (lastFullScreenState && !Gdx.graphics.isFullscreen()) {
Graphics.DisplayMode mode = Gdx.graphics.getDisplayMode();
((Lwjgl3Graphics) Gdx.graphics).getWindow().setPosition(mode.width / 4, mode.height / 4);
}
lastFullScreenState = Gdx.graphics.isFullscreen();
}
}
代码示例来源:origin: konsoletyper/teavm-libgdx
@Override
public boolean keyUp (int keycode) {
if (keycode == Keys.ENTER && Gdx.app.getType() == ApplicationType.WebGL) {
if (!Gdx.graphics.isFullscreen()) Gdx.graphics.setDisplayMode(Gdx.graphics.getDisplayModes()[0]);
}
return true;
}
});
代码示例来源:origin: jsjolund/GdxDemo3D
public void toggleFullscreen() {
if (Gdx.graphics.isFullscreen()) {
Gdx.app.debug(TAG, "Disabling fullscreen w=" + WIDTH + ", h=" + HEIGHT);
Gdx.graphics.setWindowedMode(WIDTH, HEIGHT);
} else {
Gdx.app.debug(TAG, "Enabling fullscreen w=" + Gdx.graphics.getDisplayMode().width + ", h="
+ Gdx.graphics.getDisplayMode().height);
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
}
}
代码示例来源:origin: langurmonkey/gaiasky
p.setProperty("graphics.screen.width", Integer.toString(Gdx.graphics.isFullscreen() ? GlobalConf.screen.SCREEN_WIDTH : Gdx.graphics.getWidth()));
p.setProperty("graphics.screen.height", Integer.toString(Gdx.graphics.isFullscreen() ? GlobalConf.screen.SCREEN_HEIGHT : Gdx.graphics.getHeight()));
p.setProperty("graphics.screen.fullscreen.width", Integer.toString(!Gdx.graphics.isFullscreen() ? GlobalConf.screen.FULLSCREEN_WIDTH : Gdx.graphics.getWidth()));
p.setProperty("graphics.screen.fullscreen.height", Integer.toString(!Gdx.graphics.isFullscreen() ? GlobalConf.screen.FULLSCREEN_HEIGHT : Gdx.graphics.getHeight()));
p.setProperty("graphics.screen.fullscreen", Boolean.toString(Gdx.graphics.isFullscreen()));
p.setProperty("graphics.screen.resizable", Boolean.toString(GlobalConf.screen.RESIZABLE));
p.setProperty("graphics.screen.vsync", Boolean.toString(GlobalConf.screen.VSYNC));
代码示例来源:origin: 00-Evan/shattered-pixel-dungeon-gdx
RedButton btnResolution = new RedButton(Gdx.graphics.isFullscreen() ? TXT_SWITCH_WIN : TXT_SWITCH_FULL ) {
@Override
protected void onClick() {
代码示例来源:origin: langurmonkey/gaiasky
logger.info("Display mode", Gdx.graphics.getWidth() + "x" + Gdx.graphics.getHeight(), "Fullscreen: " + Gdx.graphics.isFullscreen());
logger.info("Device", Gdx.gl.glGetString(GL20.GL_RENDERER));
logger.info(I18n.bundle.format("notif.glslversion", Gdx.gl.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION)));
内容来源于网络,如有侵权,请联系作者删除!