コード例 #1
0
    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);
    }
コード例 #2
0
 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;
 }
コード例 #3
0
 public void BackClick()
 {
     if (MenuSystem.CanInvoke)
     {
         TransitionBack <MainMenu>();
         selectedMenuItem = null;
     }
 }
コード例 #4
0
 private void BindLevelIfNeeded(WorkshopMenuItem item)
 {
     if (!(item == null))
     {
         WorkshopLevelMetadata level = item.level;
         if (boundLevel == null || level.folder != boundLevel.folder)
         {
             BindLevel(level);
         }
     }
 }
コード例 #5
0
 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();
         }
     }
 }
コード例 #6
0
 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);
         }
     }
 }
コード例 #7
0
    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);
            }
        }
    }
コード例 #8
0
 private void ClearSelectedItem()
 {
     boundLevel       = null;
     selectedMenuItem = null;
 }