コード例 #1
0
        /// <summary>
        /// When the user cancels the main menu, ask if they want to exit the sample.
        /// </summary>
        protected override void OnCancel()
        {
            const string message = "Are you sure you want to exit this game?";

            MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message);

            confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmExitMessageBox);
        }
コード例 #2
0
ファイル: PlayScreen.cs プロジェクト: abcfantasy/Green-Time
 private void ShowTutorial( string message )
 {
     // only show tutorials if enabled
     if (SettingsManager.TutorialsEnabled)
     {
         MessageBoxScreen tutorialMessageBox = new MessageBoxScreen("Tutorial: " + message, false, true);
         ScreenManager.AddScreen(tutorialMessageBox);
     }
 }
コード例 #3
0
ファイル: PauseScreen.cs プロジェクト: abcfantasy/Green-Time
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        void QuitGameMenuEntrySelected(object sender, EventArgs e)
        {
            const string message = "Are you sure you want to quit this game?";

            MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox);
        }