示例#1
0
        public Tuple <string, int, List <bool> > ShowDialog(PopupBox popupBox, List <bool> checkBoxOptionStates = null)
        {
            var popup = new Civ2dialog(_main, popupBox, checkboxOptionState: checkBoxOptionStates);

            popup.ShowModal(_main);
            return(Tuple.Create(popup.SelectedButton, popup.SelectedIndex, popup.CheckboxReturnStates));
        }
示例#2
0
        public void MainMenu()
        {
            sinaiPanel = new PicturePanel(Images.ExtractBitmap(DLLs.Intro, "sinaiPic"));
            layout.Add(sinaiPanel, new Point(160, 76));

            var mainMenuDialog = new Civ2dialog(this, popupBoxList["MAINMENU"]);

            mainMenuDialog.Location = new Point((int)(Screen.PrimaryScreen.Bounds.Width - mainMenuDialog.Width - 156),
                                                (int)(Screen.PrimaryScreen.Bounds.Height - mainMenuDialog.Height - 72));
            mainMenuDialog.ShowModal(this);

            sinaiPanel.Dispose();
            switch (mainMenuDialog.SelectedIndex)
            {
            //New Game
            case 0:
            {
                NewGame.Start(this, false);
                break;
            }

            // Start premade
            case 1:
            {
                LocateStartingFiles("Select Map To Load",
                                    new FileFilter("Save Files (*.mp)", ".mp"), StartPremadeInit);
                break;
            }

            //Customise World
            case 2:
            {
                NewGame.Start(this, true);
                break;
            }

            // Load scenario
            case 3:
            {
                LocateStartingFiles("Select Scenario To Load",
                                    new FileFilter("Save Files (*.scn)", ".scn"), LoadScenarioInit);
                break;
            }

            // Load game
            case 4:
            {
                LocateStartingFiles("Select Game To Load", new FileFilter("Save Files (*.sav)", ".SAV"),
                                    LoadGameInitialization
                                    );
                break;
            }
            }
        }
示例#3
0
        public void Playgame()
        {
            Sounds.Stop();
            Sounds.PlaySound(GameSounds.MenuOk);

            var playerCiv = Game.GetPlayerCiv;

            var dialog = new Civ2dialog(this, popupBoxList["LOADOK"], new List <string>
            {
                playerCiv.LeaderTitle, playerCiv.LeaderName,
                playerCiv.TribeName, Game.GetGameYearString,
                Game.DifficultyLevel.ToString()
            });

            dialog.ShowModal(this);
            StartGame();
            Sounds.PlaySound(GameSounds.MenuOk);
        }
示例#4
0
        public void ShowCityDialog(string dialog, IList <string> replaceStrings)
        {
            var popupbox = new Civ2dialog(this, popupBoxList[dialog], replaceStrings);

            popupbox.ShowModal(Parent);
        }