public static UI getAppUI() { return ((BladeEngine) Gdx.app.getApplicationListener()).getUI(); }
@Override public boolean keyUp(int keycode) { if (keycode == Input.Keys.BACK || keycode == Input.Keys.ESCAPE) { // do nothing // Return without saving the changes ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen()); return true; } return false; }
@Override public void clicked(InputEvent event, float x, float y) { ((Game) Gdx.app.getApplicationListener()).setScreen(new SongScreen()); } });
@Override public void clicked(InputEvent event, float x, float y) { //Same way we moved here from the Splash Screen //We set it to new Splash because we got no other screens //otherwise you put the screen there where you want to go ((Game) Gdx.app.getApplicationListener()).setScreen(new SongSelectionScreen()); } });
public void clicked(InputEvent event, float x, float y) { ((Game) Gdx.app.getApplicationListener()).setScreen(new LiveOptionsScreen()); } });
@Override public void clicked(InputEvent event, float x, float y) { ((Game) Gdx.app.getApplicationListener()).setScreen(new SettingsScreen()); } });
@Override public void clicked(InputEvent event, float x, float y) { ((Game) Gdx.app.getApplicationListener()).setScreen(new SongSelectionScreen()); } });
public void clicked(InputEvent event, float x, float y) { ((Game) Gdx.app.getApplicationListener()).setScreen(new SongSelectionScreen()); } });
void sizeChanged (int width, int height) { if (isMac) { glfwShowWindow(window); // This is required to refresh the NSOpenGLContext on OSX! } width = Math.max(1, width); height = Math.max(1, height); this.width = width; this.height = height; Gdx.gl.glViewport(0, 0, width, height); ApplicationListener listener = Gdx.app.getApplicationListener(); if (listener != null) listener.resize(width, height); requestRendering(); }
@Override public void clicked(InputEvent event, float x, float y) { Assets.hardReloadBeatmaps(); ((Game) Gdx.app.getApplicationListener()).setScreen(new BeatmapReloadScreen()); } });
@Override public void clicked(InputEvent event, float x, float y) { Assets.selectedGroup = songList.getSelected(); Assets.selectedBeatmap = diffList.getSelected(); stopPreviewSong(); ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen()); } }));
@Override public void clicked(InputEvent event, float x, float y) { GlobalConfiguration.songVolume = newVolume; GlobalConfiguration.feedbackVolume = newFeedbackVolume; GlobalConfiguration.offset = newGlobalOffset; GlobalConfiguration.inputOffset = newInputOffset; GlobalConfiguration.noteSpeed = newNoteSpeed; GlobalConfiguration.overallDifficulty = newOverallDifficulty; GlobalConfiguration.playHintSounds = newHitSoundsSetting; GlobalConfiguration.sortMode = newSortingMode; GlobalConfiguration.sortOrder = newSortingOrder; GlobalConfiguration.randomMode = newRandomMode; GlobalConfiguration.syncMode = newSyncMode; GlobalConfiguration.storeConfiguration(); ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen()); } });
@Override public void clicked(InputEvent event, float x, float y) { if (theSong != null) { theSong.stop(); theSong.dispose(); } ((Game) Gdx.app.getApplicationListener()).setScreen(new SongScreen()); } }));
@Override public void clicked(InputEvent event, float x, float y) { if (theSong != null) { theSong.stop(); theSong.dispose(); } ((Game) Gdx.app.getApplicationListener()).setScreen(new SongSelectionScreen()); } }));
@Override public boolean keyUp(int keycode) { if (keycode == Input.Keys.BACK || keycode == Input.Keys.ESCAPE) { if (theSong != null) { theSong.stop(); theSong.dispose(); } ((Game) Gdx.app.getApplicationListener()).setScreen(new SongSelectionScreen()); // do nothing return true; } return false; }
@Override public void clicked(InputEvent event, float x, float y) { if (diffList.getSelected() == null) { return; } stopPreviewSong(); Assets.selectedBeatmap = diffList.getSelected(); SimpleSongLoader loader = new SimpleSongLoader(); Assets.selectedSong = loader.loadSong(Assets.selectedBeatmap); if (!Assets.selectedSong.getValid() || loader.getErrors().size() > 0 || loader.getWarnings().size() > 0) { ((Game) Gdx.app.getApplicationListener()).setScreen(new BeatmapLoadingScreen()); } else { ((Game) Gdx.app.getApplicationListener()).setScreen(new LiveOptionsScreen()); } } }));
@Override public boolean keyUp(int keycode) { if (keycode == Input.Keys.BACK || keycode == Input.Keys.ESCAPE) { Assets.selectedBeatmap = diffList.getSelected(); Assets.selectedGroup = songList.getSelected(); stopPreviewSong(); ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen()); // do nothing return true; } return false; }
@Override public void render(float delta) { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); loadingTime -= delta; if (loadingTime <= 0 && !warnings) { if (valid) { ((Game) Gdx.app.getApplicationListener()).setScreen(new SongScreen()); } } stage.act(); stage.draw(); }
@Override public void render(float delta) { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); stage.act(); stage.draw(); // done loading if (Assets.update()) { if (phase == 1) { Assets.setSongs(); ((Game) Gdx.app.getApplicationListener()).setScreen(new SettingsScreen()); } if (phase == 0) { phase++; // this will cause any newly created .rs files to be loaded. Assets.reloadBeatmaps(); } } loadingProgress.setValue((Assets.getProgress() - 0.5f)* 200f); loadingProgress.act(delta); }
@Override public void render(float delta) { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); stage.act(); stage.draw(); if (Assets.update()) { // check if all files are loaded if (animationDone) { // when the animation is finished, go to MainMenu() // load the assets to into the Assets class Assets.setMenuSkin(); Assets.setHitsounds(); Assets.setTextures(); Assets.setFonts(); if (phase == 1) { Assets.setSongs(); ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen()); } if (phase == 0) { phase++; Assets.reloadBeatmaps(); } } } loadingProgress.setValue(phase == 0 ? Assets.getProgress() * 100f : (Assets.getProgress() - 0.5f)*200f); loadingProgress.act(delta); }