@Override public void dispose () { if (screen != null) screen.hide(); }
@Override public void dispose () { if (screen != null) screen.hide(); }
/** 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 dispose () { if (screen != null) screen.hide(); }
private void clearScreens() { for (Screen screen : screens) { screen.hide(); screen.dispose(); if (screen instanceof AbstractScreen) { ((AbstractScreen) screen).unloadAssets(); } } this.topScreen = NULL_SCREEN; screens.clear(); }
private void removeScreen() { unloadAssets(); Screen top = screens.pop(); top.hide(); top.dispose(); }
public void addScreen(Screen screen) { validateScreen(screen); getTopScreen().hide(); screens.push(screen); this.topScreen = getTopScreen(); displayTopScreen(); }
public void replaceTopScreen(Screen screen) { validateScreen(screen); if(screens.isEmpty()) { setScreen(screen); } else { Screen topScreen = getTopScreen(); topScreen.hide(); topScreen.dispose(); screens.pop(); screens.push(screen); this.topScreen = getTopScreen(); displayTopScreen(); } }
/** 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()); } }