/// <summary> /// Event handler for when red entry is selected. /// </summary> void redSelected(object sender, PlayerIndexEventArgs e) { red.Text = "[RED]"; blue.Text = "Blue"; green.Text = "Green"; yellow.Text = "Yellow"; ScreenManager.CharacterColor = Color.Red; }
/// <summary> /// Event handler for when blue entry is selected. /// </summary> void blueSelected(object sender, PlayerIndexEventArgs e) { red.Text = "Red"; blue.Text = "[BLUE]"; green.Text = "Green"; yellow.Text = "Yellow"; ScreenManager.CharacterColor = Color.Blue; }
/// <summary> /// Event handler for when green entry is selected. /// </summary> void greenSelected(object sender, PlayerIndexEventArgs e) { red.Text = "Red"; blue.Text = "Blue"; green.Text = "[GREEN]"; yellow.Text = "Yellow"; ScreenManager.CharacterColor = Color.Green; }
/// <summary> /// Event handler for when the Quit Game menu entry is selected. /// </summary> void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { const string message = "Are you sure you want to quit this game?"; MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message); confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted; ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to quit" message box. This uses the loading screen to /// transition from the game back to the main menu screen. /// </summary> void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); }
/// <summary> /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler. /// </summary> protected void OnCancel(object sender, PlayerIndexEventArgs e) { OnCancel(e.PlayerIndex); }
/// <summary> /// Event handler for when yellow entry is selected. /// </summary> void yellowSelected(object sender, PlayerIndexEventArgs e) { red.Text = "Red"; blue.Text = "Blue"; green.Text = "Green"; yellow.Text = "[YELLOW]"; ScreenManager.CharacterColor = Color.Yellow; }
/// <summary> /// Event handler for when the Options menu entry is selected. /// </summary> void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex); }
/// <summary> /// Event handler for when the Play Game menu entry is selected. /// </summary> void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen()); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to exit" message box. /// </summary> void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { ScreenManager.Game.Exit(); }
/// <summary> /// Event handler for when the multiplayer entry is selected. /// </summary> void MultiplayerEntrSelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new LobbyScreen(), e.PlayerIndex); }
/// <summary> /// Event handler for when the ChooseCharacterColor menu entry is selected. /// </summary> void ChooseCharacterMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new CharacterColorScreen(), e.PlayerIndex); }
/// <summary> /// Event handler for when the Ungulate menu entry is selected. /// </summary> void UngulateMenuEntrySelected(object sender, PlayerIndexEventArgs e) { currentUngulate++; if (currentUngulate > Ungulate.Llama) currentUngulate = 0; SetMenuEntryText(); }
/// <summary> /// Event handler for when the Language menu entry is selected. /// </summary> void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e) { currentLanguage = (currentLanguage + 1) % languages.Length; SetMenuEntryText(); }
/// <summary> /// Event handler for when the Frobnicate menu entry is selected. /// </summary> void FrobnicateMenuEntrySelected(object sender, PlayerIndexEventArgs e) { frobnicate = !frobnicate; SetMenuEntryText(); }
/// <summary> /// Event handler for when the Elf menu entry is selected. /// </summary> void ElfMenuEntrySelected(object sender, PlayerIndexEventArgs e) { elf++; SetMenuEntryText(); }