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; } } }
// Load intro screen public void ShowIntroScreen() { this.suppressKeyEvent = true; // Sinai pic sinaiPanel = new PicturePanel(Images.SinaiPic); layout.Add(sinaiPanel, new Point((int)(Screen.PrimaryScreen.Bounds.Width * 0.08333), (int)(Screen.PrimaryScreen.Bounds.Height * 0.0933))); // Choice menu choiceMenu = new ChoiceMenuPanel(this); layout.Add(choiceMenu, new Point((int)(Screen.PrimaryScreen.Bounds.Width * 0.745), (int)(Screen.PrimaryScreen.Bounds.Height * 0.570))); // Disable main menu items foreach (MenuItem item in this.Menu.Items) { item.Enabled = false; } Content = layout; }