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); }
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(); } }
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); }