@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()); } } });
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());
@Override public void create() { // Gdx.input.setCursorCatched(false); if (fullscreen) Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); hideCursor(); super.create(); }
public void toggleFullScreen() { if (!fullscreen) { Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); fullscreen = true; } else { Gdx.graphics.setWindowedMode(w.getWidth(), w.getHeight()); fullscreen = false; } }
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); } }
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()); } }
boolean good = Gdx.graphics.setFullscreenMode(mymode); if (!good) { logger.error(I18n.bundle.format("notif.error", I18n.bundle.get("gui.fullscreen")));