本文整理了Java中com.badlogic.gdx.Graphics.setFullscreenMode()
方法的一些代码示例,展示了Graphics.setFullscreenMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphics.setFullscreenMode()
方法的具体详情如下:
包路径:com.badlogic.gdx.Graphics
类名称:Graphics
方法名:setFullscreenMode
[英]Sets the window to full-screen mode.
[中]将窗口设置为全屏模式。
代码示例来源:origin: libgdx/libgdx
@Override
public void clicked (InputEvent event, float x, float y) {
super.clicked(event, x, y);
if (isWindowed) {
isWindowed = false;
changeModeButton.setText(fullScreenInstructions);
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
} else {
isWindowed = true;
changeModeButton.setText(windowedInstructions);
Gdx.graphics.setWindowedMode(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
}
}
});
代码示例来源:origin: libgdx/libgdx
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
batch.getProjectionMatrix().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
Gdx.gl.glViewport(0, 0, Gdx.graphics.getBackBufferWidth(), Gdx.graphics.getBackBufferHeight());
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@Override
public void create() {
// Gdx.input.setCursorCatched(false);
if (fullscreen)
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
hideCursor();
super.create();
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
public void toggleFullScreen() {
if (!fullscreen) {
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
fullscreen = true;
} else {
Gdx.graphics.setWindowedMode(w.getWidth(), w.getHeight());
fullscreen = false;
}
}
代码示例来源:origin: 00-Evan/shattered-pixel-dungeon-gdx
public static void fullscreen( boolean value ) {
if (value) {
put(KEY_WINDOW_FULLSCREEN, true);
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
} else {
int w = getInt(KEY_WINDOW_WIDTH, DEFAULT_WINDOW_WIDTH);
int h = getInt(KEY_WINDOW_HEIGHT, DEFAULT_WINDOW_HEIGHT);
put(KEY_WINDOW_FULLSCREEN, false);
Gdx.graphics.setWindowedMode(w, h);
}
}
代码示例来源: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
boolean good = Gdx.graphics.setFullscreenMode(mymode);
if (!good) {
logger.error(I18n.bundle.format("notif.error", I18n.bundle.get("gui.fullscreen")));
内容来源于网络,如有侵权,请联系作者删除!