示例#1
0
        private void OnQuit(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Are you sure you want to quit the game?";
            var          confirmExitMessageBox = new MessageBoxScreen(message);

            confirmExitMessageBox.Accepted += OnQuitMessageAccepted;

            ScreenManager.AddScreen(confirmExitMessageBox, e.PlayerIndex);
        }
示例#2
0
        private void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Are you sure you want to quit this game?";
            var          confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
示例#3
0
        protected override void OnCancel(PlayerIndex playerIndex)
        {
            const string message = "Are you sure you want to quit the game?";
            var          confirmExitMessageBox = new MessageBoxScreen(message);

            confirmExitMessageBox.Accepted += OnQuitMessageAccepted;

            ScreenManager.AddScreen(confirmExitMessageBox, playerIndex);
        }