Esempio n. 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public OptionsMenuScreen()
            : base("Nastavení")
        {
            fillResolutionsMenu();

            // Create our menu entries.
            resolutionMenuEntry = new MenuEntry(string.Empty);
            fullscreenMenuEntry = new MenuEntry(string.Empty);

            SetMenuEntryText();

            MenuEntry apply = new MenuEntry(Strings.MENU_OPTION_ACTIVATE_CHANGES);
            MenuEntry back = new MenuEntry(Strings.MENU_COMMON_BACK);

            // Hook up menu event handlers.
            resolutionMenuEntry.Selected += ResolutionMenuEntrySelected;
            fullscreenMenuEntry.Selected += FullscreenMenuEntrySelected;
            apply.Selected += ApplyChangesSelected;
            back.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(resolutionMenuEntry);
            MenuEntries.Add(fullscreenMenuEntry);
            MenuEntries.Add(apply);
            MenuEntries.Add(back);

            isFullscreen = Settings.isFullscreen;

            SetMenuEntryText();
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor fills in the menu contents.
        /// </summary>
        public MainMenuScreen()
            : base("Main Menu")
        {
            // Create our menu entries.
            MenuEntry hotseatMenuEntry = new MenuEntry(Strings.MENU_MAIN_HOT_SEAT);
            MenuEntry quickMenuEntry = new MenuEntry(Strings.MENU_MAIN_QUICK_GAME);
            MenuEntry campaignMenuEntry = new MenuEntry(Strings.MENU_MAIN_CAMPAIGN);
            MenuEntry settingsMenuEntry = new MenuEntry(Strings.MENU_MAIN_OPTION);
            MenuEntry creatorsMenuEntry = new MenuEntry(Strings.MENU_MAIN_CREATORS);
            MenuEntry exitMenuEntry = new MenuEntry(Strings.MENU_MAIN_EXIT);

            // Hook up menu event handlers.
            hotseatMenuEntry.Selected += HotseatMenuEntrySelected;
            quickMenuEntry.Selected += QuickMenuEntrySelected;
            campaignMenuEntry.Selected += CampaignMenuEntrySelected;
            settingsMenuEntry.Selected += SettingsMenuEntrySelected;
            creatorsMenuEntry.Selected += CreatorsMenuEntrySelected;
            exitMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            //MenuEntries.Add(quickMenuEntry);
            MenuEntries.Add(campaignMenuEntry);
            //MenuEntries.Add(hotseatMenuEntry);
            MenuEntries.Add(settingsMenuEntry);
            MenuEntries.Add(creatorsMenuEntry);
            MenuEntries.Add(exitMenuEntry);
        }
Esempio n. 3
0
 /// <summary>
 /// Constructor fills in the menu contents.
 /// </summary>
 public CampaignMenuScreen()
     : base("Campaign Menu")
 {
     DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Content\\Maps");
     FileInfo[] subFiles = di.GetFiles();
     xDoc = new XmlDocument();
     mapnamesource = new Dictionary<string, string>();
     MenuEntry levelMenuItem;
     if (subFiles.Length > 0)
     {
         foreach (FileInfo subFile in subFiles)
         {
             string name = subFile.Name;
             if(name.StartsWith("cam"))
             {
                 xDoc.Load(subFile.FullName);
                 XmlNodeList nameNode = xDoc.GetElementsByTagName("name");
                 mapnamesource.Add(nameNode[0].InnerText, name);
                 levelMenuItem = new MenuEntry(nameNode[0].InnerText);
                 levelMenuItem.Selected += CampaignLevelSelected;
                 MenuEntries.Add(levelMenuItem);
             }
         }
     }
 }
Esempio n. 4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public PauseMenuScreen()
            : base("Paused")
        {
            // Create our menu entries.
            MenuEntry resumeGameMenuEntry = new MenuEntry(Strings.MENU_PAUSE_GAME_ITEM_RESUME);
            MenuEntry restartGameMenuEntry = new MenuEntry(Strings.MENU_PAUSE_GAME_ITEM_RESTART);
            MenuEntry quitGameMenuEntry = new MenuEntry(Strings.MENU_PAUSE_GAME_ITEM_QUIT_GAME);

            // Hook up menu event handlers.
            resumeGameMenuEntry.Selected += OnCancel;
            resumeGameMenuEntry.Selected += ResumeGameMenuEntrySelected;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;
            restartGameMenuEntry.Selected += OnCancel;
            restartGameMenuEntry.Selected += RestartGameMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(restartGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }
Esempio n. 5
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public CreatorsMenuScreen()
            : base(Strings.MENU_OPTION_TITLE)
        {
            // Create our menu entries.
            alenaMenuEntry = new MenuEntry(string.Empty);
            pavlaMenuEntry = new MenuEntry(string.Empty);
            lukasMenuEntry = new MenuEntry(string.Empty);

            SetMenuEntryText();

            MenuEntry back = new MenuEntry(Strings.MENU_COMMON_BACK);

            // Hook up menu event handlers.
            back.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(lukasMenuEntry);
            MenuEntries.Add(alenaMenuEntry);
            MenuEntries.Add(pavlaMenuEntry);
            MenuEntries.Add(back);
        }