示例#1
0
 // Token: 0x060036B3 RID: 14003 RVA: 0x00177325 File Offset: 0x00175725
 private static void onClickedLevel(SleekLevel level, byte index)
 {
     if ((int)index < MenuPlayMatchmakingUI.levels.Length && MenuPlayMatchmakingUI.levels[(int)index] != null)
     {
         PlaySettings.matchmakingMap = MenuPlayMatchmakingUI.levels[(int)index].name;
         MenuPlayMatchmakingUI.updateSelection();
     }
 }
示例#2
0
        // Token: 0x060036B8 RID: 14008 RVA: 0x0017741C File Offset: 0x0017581C
        private static void refreshLevels()
        {
            MenuPlayMatchmakingUI.levelScrollBox.remove();
            MenuPlayMatchmakingUI.levels = Level.getLevels((!OptionsSettings.matchmakingShowAllMaps) ? ESingleplayerMapCategory.MATCHMAKING : ESingleplayerMapCategory.ALL);
            bool flag = false;

            MenuPlayMatchmakingUI.levelButtons = new SleekLevel[MenuPlayMatchmakingUI.levels.Length];
            for (int i = 0; i < MenuPlayMatchmakingUI.levels.Length; i++)
            {
                if (MenuPlayMatchmakingUI.levels[i] != null)
                {
                    SleekLevel sleekLevel = new SleekLevel(MenuPlayMatchmakingUI.levels[i], false);
                    sleekLevel.positionOffset_Y = i * 110;
                    SleekLevel sleekLevel2 = sleekLevel;
                    if (MenuPlayMatchmakingUI.< > f__mg$cache0 == null)
                    {
                        MenuPlayMatchmakingUI.< > f__mg$cache0 = new ClickedLevel(MenuPlayMatchmakingUI.onClickedLevel);
                    }
                    sleekLevel2.onClickedLevel = MenuPlayMatchmakingUI.< > f__mg$cache0;
                    MenuPlayMatchmakingUI.levelScrollBox.add(sleekLevel);
                    MenuPlayMatchmakingUI.levelButtons[i] = sleekLevel;
                    if (!flag && MenuPlayMatchmakingUI.levels[i].name == PlaySettings.matchmakingMap)
                    {
                        flag = true;
                    }
                }
            }
            if (MenuPlayMatchmakingUI.levels.Length == 0)
            {
                PlaySettings.matchmakingMap = string.Empty;
            }
            else if (!flag || PlaySettings.matchmakingMap == null || PlaySettings.matchmakingMap.Length == 0)
            {
                PlaySettings.matchmakingMap = MenuPlayMatchmakingUI.levels[0].name;
            }
            MenuPlayMatchmakingUI.updateSelection();
            MenuPlayMatchmakingUI.levelScrollBox.area = new Rect(0f, 0f, 5f, (float)(MenuPlayMatchmakingUI.levels.Length * 110 - 10));
        }