Esempio n. 1
0
        private void ShowPauseDialog()
        {
            if (_displayingDialogType != DisplayingDialogType.None)
            {
                throw new InvalidOperationException();
            }

            _displayingDialogType = DisplayingDialogType.Pause;

            _listener.PauseCLicked();

            var dialog = _uiSystem.InstantiateWindow(WindowType.Dialog, _resources.PauseDialog, false);

            _displayingDialog = dialog;

            dialog.Show();
            dialog.OnHideFinish += () => {
                ClearDisplayingDialog();
                switch (dialog.Result)
                {
                case PauseDialog.Intent.Resume:
                    _listener.ResumeCLicked();
                    break;

                case PauseDialog.Intent.Exit:
                    _listener.ExitCLicked();
                    break;
                }
            };
        }