예제 #1
0
 private static void onClickedLevel(SleekLevel level, byte index)
 {
     if ((int)index < MenuWorkshopEditorUI.levels.Length && MenuWorkshopEditorUI.levels[(int)index] != null && MenuWorkshopEditorUI.levels[(int)index].isEditable)
     {
         PlaySettings.editorMap = MenuWorkshopEditorUI.levels[(int)index].name;
         MenuWorkshopEditorUI.updateSelection();
     }
 }
예제 #2
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();
     }
 }
예제 #3
0
        private static void onLevelsRefreshed()
        {
            MenuWorkshopEditorUI.levelScrollBox.remove();
            MenuWorkshopEditorUI.levels = Level.getLevels(ESingleplayerMapCategory.EDITABLE);
            bool flag = false;

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