@Override public void resize (int width, int height) { if (screen != null) screen.resize(width, height); }
@Override public void resize (int width, int height) { if (screen != null) screen.resize(width, height); }
/** Sets the current screen. {@link Screen#hide()} is called on any old screen, and {@link Screen#show()} is called on the new * screen, if any. * @param screen may be {@code null} */ public void setScreen (Screen screen) { if (this.screen != null) this.screen.hide(); this.screen = screen; if (this.screen != null) { this.screen.show(); this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } }
/** Sets the current screen. {@link Screen#hide()} is called on any old screen, and {@link Screen#show()} is called on the new * screen, if any. * @param screen may be {@code null} */ public void setScreen (Screen screen) { if (this.screen != null) this.screen.hide(); this.screen = screen; if (this.screen != null) { this.screen.show(); this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } }
@Override public void resize (int width, int height) { if (screen != null) screen.resize(width, height); }
@Override public void resize(int newWidth, int newHeight) { if (this.width == newWidth && this.height == newHeight) { return; } this.width = newWidth; this.height = newHeight; int newTargetWidth = targetWidth; int newTargetHeight = targetHeight; fileHandleResolver = new StageBuilderFileHandleResolver(this.width, supportedResolutions); if (this.height > this.width) { newTargetWidth = targetHeight; newTargetHeight = targetWidth; } this.resolutionHelper.resize(newTargetWidth, newTargetHeight, this.width, this.height); this.topScreen.resize(this.width, this.height); }
/** Sets the current screen. {@link Screen#hide()} is called on any old screen, and {@link Screen#show()} is called on the new * screen, if any. * @param screen may be {@code null} */ public void setScreen (Screen screen) { if (this.screen != null) this.screen.hide(); this.screen = screen; if (this.screen != null) { this.screen.show(); this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } }