Exemple #1
0
		void ShowGameModeDialog (UIScreenType nextScreen)
		{
			GameModeDialog d = new GameModeDialog (this, mpq);
			d.Cancel += delegate () { DismissDialog (); };
			d.Activate += delegate (bool expansion) {
				DismissDialog ();
				try {
					Game.Instance.PlayingBroodWar = expansion;
					GuiUtil.PlaySound (mpq, Builtins.Mousedown2Wav);
					Game.Instance.SwitchToScreen (nextScreen);
				}
				catch (Exception e) {
					ShowDialog (new OkDialog (this, mpq, e.Message));
				}
			};
			ShowDialog (d);
		}
Exemple #2
0
        void ShowGameModeDialog(UIScreenType nextScreen)
        {
            GameModeDialog d = new GameModeDialog(this, mpq);

            d.Cancel   += delegate() { DismissDialog(); };
            d.Activate += delegate(bool expansion) {
                DismissDialog();
                try {
                    Game.Instance.PlayingBroodWar = expansion;
                    GuiUtil.PlaySound(mpq, Builtins.Mousedown2Wav);
                    Game.Instance.SwitchToScreen(nextScreen);
                }
                catch (Exception e) {
                    ShowDialog(new OkDialog(this, mpq, e.Message));
                }
            };
            ShowDialog(d);
        }