private void SelectItem(ListViewItem item) { WorkshopMenuItem workshopMenuItem = item as WorkshopMenuItem; if (selectedMenuItem != null) { selectedMenuItem.SetActive(active: false); } selectedMenuItem = workshopMenuItem; selectedMenuItem.SetActive(active: true); BindLevelIfNeeded(selectedMenuItem); bool flag = true; if (CouldShowFindMore()) { if (DLC.instance.SupportsDLC()) { levelBundleID = DLC.instance.LevelIsDLC(workshopMenuItem.level.workshopId); if (levelBundleID != 0) { flag = DLC.instance.BundleActive(levelBundleID); } } FindMoreButton.SetActive(!flag); } UpdateTitle(!flag); }
public void BackClick() { if (!MenuSystem.CanInvoke || SteamProgressOverlay.instance.DialogShowing() || SteamProgressOverlay.instance.DialogErrorShowing()) { return; } switch (displayMode) { case LevelSelectMenuMode.Campaign: case LevelSelectMenuMode.EditorPicks: case LevelSelectMenuMode.SubscribedWorkshop: case LevelSelectMenuMode.LocalWorkshop: case LevelSelectMenuMode.BuiltInLobbies: case LevelSelectMenuMode.WorkshopLobbies: if (isMultiplayer) { TransitionBack <MultiplayerLobbyMenu>(); } else { TransitionBack <PlayMenu>(); } break; } selectedMenuItem = null; }
public void BackClick() { if (MenuSystem.CanInvoke) { TransitionBack <MainMenu>(); selectedMenuItem = null; } }
private void BindLevelIfNeeded(WorkshopMenuItem item) { if (!(item == null)) { WorkshopLevelMetadata level = item.level; if (boundLevel == null || level.folder != boundLevel.folder) { BindLevel(level); } } }
private void SubmitItemRestart(ListViewItem item) { if (!BoundIsLobbyLevel()) { WorkshopMenuItem workshopMenuItem = item as WorkshopMenuItem; if ((displayMode == LevelSelectMenuMode.Campaign || isMultiplayer) && DLC.instance.SupportsDLC() && !DLC.instance.LevelIsAvailable((int)workshopMenuItem.level.workshopId)) { FindMoreClick(); } else { RestartClick(); } } }
private void SubmitItemPlay(ListViewItem item) { if (IsLobbyMode()) { boundLevel = (item as WorkshopMenuItem).level; PlayClick(); } else if (MenuSystem.CanInvoke && !BoundIsLobbyLevel()) { WorkshopMenuItem workshopMenuItem = item as WorkshopMenuItem; if ((displayMode == LevelSelectMenuMode.Campaign || isMultiplayer) && DLC.instance.SupportsDLC() && !DLC.instance.LevelIsAvailable((int)workshopMenuItem.level.workshopId)) { FindMoreClick(); } else { Play(workshopMenuItem.level); } } }
private void OnSelect(ListViewItem item) { WorkshopMenuItem workshopMenuItem = item as WorkshopMenuItem; if (selectedMenuItem != null) { selectedMenuItem.SetActive(active: false); } selectedMenuItem = workshopMenuItem; selectedMenuItem.SetActive(active: true); BindLevelIfNeeded(selectedMenuItem); bool flag = true; if (DLC.instance.SupportsDLC()) { levelBundleID = DLC.instance.LevelIsDLC(workshopMenuItem.level.title); if (levelBundleID != 0) { flag = DLC.instance.BundleActive(levelBundleID); } } }
private void ClearSelectedItem() { boundLevel = null; selectedMenuItem = null; }