示例#1
0
        protected virtual void AddWorldmapMenu()
        {
            var worldmapMenu = new WorldmapMenu(MenuData, this);

            worldmapMenu.ChapterSelected        += worldmapMenu_ChapterSelected;
            worldmapMenu.Canceled               += worldmapMenu_Canceled;
            worldmapMenu.Refreshing             += worldmapMenu_Refreshing;
            worldmapMenu.ChapterCommandSelected += worldmapMenu_ChapterCommandSelected;
            AddMenu(worldmapMenu);

            MenuHandler.WorldmapChapterChanged(MenuData.Chapter);
        }
示例#2
0
 private void SelectChapter(WorldmapMenu worldmapMenu)
 {
     if (worldmapMenu.PreviousChapterSelectionIncomplete())
     {
         // A lone prior requirement of a chapter from
         // another battalion can make this crash //@Yeti
         AddPreviousChapterSelectionMenu(worldmapMenu);
     }
     else
     {
         worldmapMenu.SelectChapter();
     }
 }
示例#3
0
        private void AddPreviousChapterSelectionMenu(WorldmapMenu worldmapMenu)
        {
            worldmapMenu.StorePreviousChapters();

            // Open previous chapter selection
            var previousChapterSelectionWindow =
                new PreviousChapterSelectionMenu(
                    new Vector2(Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT) / 2,
                    MenuData.ChapterId,
                    MenuData,
                    worldmapMenu);

            previousChapterSelectionWindow.activate(worldmapMenu.CursorLoc);
            previousChapterSelectionWindow.Selected += previousChapterSelectionWindow_Selected;
            previousChapterSelectionWindow.PreviousChapterChanged += previousChapterSelectionWindow_PreviousChapterChanged;
            previousChapterSelectionWindow.Canceled += previousChapterSelectionWindow_Canceled;
            AddMenu(previousChapterSelectionWindow);
        }