/* * Draws the buttons for the level selection and navigation */ protected void drawLevelSelection() { goBackButton = buttonHandler.getGoBackButton(); goForwardButton = buttonHandler.getGoForwardButton(); homeButton = buttonHandler.getHomeMiddleButton(); if (Spectrum.currentAct == SpectrumEnums.Act.None) { goBackButton.setRefGameState(SpectrumEnums.GameState.MainMenu); } else { goBackButton.setRefGameState(SpectrumEnums.GameState.LevelSelection); goBackButton.setRefAct(screenManager.getPreviousAct()); } if (screenManager.getNextAct() != SpectrumEnums.Act.None) { goForwardButton.setRefAct(screenManager.getNextAct()); buttonHandler.Add(goForwardButton); } buttonHandler.Add(homeButton); buttonHandler.Add(goBackButton); drawLevelSelectionButtons(); }
/* * Draws the buttons for settings menu */ protected void drawSettingsMenu() { goBackButton = buttonHandler.getGoBackButton() ; goBackButton.setRefGameState(SpectrumEnums.GameState.MainMenu); gameAnalyticsButton = buttonHandler.getGameAnalyticsButton(); musicSettingsButton = buttonHandler.getMusicSettingsButton(); deleteSaveFileButton = buttonHandler.getDeleteSaveFileButton(); if (!Spectrum.isGameInterrupted) { buttonHandler.Add(musicSettingsButton); buttonHandler.Add(deleteSaveFileButton); buttonHandler.Add(goBackButton); buttonHandler.Add(gameAnalyticsButton); } }
/* * Draws the Delete SaveFile PopUp */ protected void drawDeleteSaveFile() { this.headline = "Delete Savefile"; this.text = "Are you sure? \nAll your game progress will be lost.\nThis can not be undone."; confirmButton = buttonHandler.getConfirmButton(); abortButton = buttonHandler.getAbortButton(); abortButton.setRefGameState(SpectrumEnums.GameState.SettingsMenu); confirmButton.setRefGameState(SpectrumEnums.GameState.SettingsMenu); buttonHandler.Add(abortButton); buttonHandler.Add(confirmButton); }