@Test public void testPop () { ScreenManager<IScreen> manager = this.createScreenManager(); manager.addScreen("dummy_screen", new DummyScreen()); manager.push("dummy_screen"); assertNotNull(manager.pop()); assertNull(manager.pop()); assertEquals(1, manager.listScreens().size()); assertEquals(0, manager.listActiveScreens().size()); }
@Override public IScreen pop() { IScreen screen = null; if (this.activeScreens.size() > 0) { screen = this.activeScreens.pop(); final IScreen screen1 = screen; Platform.runOnUIThread(() -> { screen1.onPause(); }); } Gdx.app.debug(TAG_SCREENS, "pop screen."); return screen; }
DefaultScreenManager implements ScreenManager<IScreen> { @Override public IScreen pop() { IScreen screen = null; if (this.activeScreens.size() > 0) { screen = this.activeScreens.pop(); final IScreen screen1 = screen; Platform.runOnUIThread(() -> { screen1.onPause(); }); } Gdx.app.debug(TAG_SCREENS, "pop screen."); return screen; } }
DefaultScreenManager implements ScreenManager<IScreen> { @Override public IScreen pop() { IScreen screen = null; if (this.activeScreens.size() > 0) { screen = this.activeScreens.pop(); final IScreen screen1 = screen; Platform.runOnUIThread(() -> { screen1.onPause(); }); } Gdx.app.debug(TAG_SCREENS, "pop screen."); return screen; } DefaultScreenManager(); }
DefaultScreenManager implements ScreenManager<IScreen> { @Override public IScreen pop() { IScreen screen = null; if (this.activeScreens.size() > 0) { screen = this.activeScreens.pop(); final IScreen screen1 = screen; Platform.runOnUIThread(() -> { screen1.onPause(); }); } Gdx.app.debug(TAG_SCREENS, "pop screen."); return screen; } DefaultScreenManager(); @Override void addScreen(String name, IScreen screen); @Override void removeScreen(String name); @Override void push(String name); @Override void leaveAllAndEnter(String name); @Override IScreen pop(); @Override IScreen getScreenByName(String name); @Override ObjectArrayList<IScreen> listScreens(); @Override ObjectArrayList<IScreen> listActiveScreens(); @Override void resize(int width, int height); @Override void update(); @Override void draw(); @Override void dispose(); }
DefaultScreenManager implements ScreenManager<IScreen> { @Override public IScreen pop() { IScreen screen = null; if (this.activeScreens.size() > 0) { screen = this.activeScreens.pop(); final IScreen screen1 = screen; Platform.runOnUIThread(() -> { screen1.onPause(); }); } Gdx.app.debug(TAG_SCREENS, "pop screen."); return screen; } DefaultScreenManager(); @Override void addScreen(String name, IScreen screen); @Override void removeScreen(String name); @Override void push(String name); @Override void leaveAllAndEnter(String name); @Override IScreen pop(); @Override IScreen getScreenByName(String name); @Override ObjectArrayList<IScreen> listScreens(); @Override ObjectArrayList<IScreen> listActiveScreens(); @Override void resize(int width, int height); @Override void update(); @Override void draw(); @Override void dispose();  }