Exemple #1
0
        // Token: 0x06001C37 RID: 7223 RVA: 0x000997E8 File Offset: 0x00097BE8
        public override Sleek createUI(Player player)
        {
            string text = this.formatReward(player);

            if (string.IsNullOrEmpty(text))
            {
                return(null);
            }
            if (!(Assets.find(EAssetType.VEHICLE, this.id) is VehicleAsset))
            {
                return(null);
            }
            SleekBox sleekBox = new SleekBox();

            sleekBox.sizeOffset_Y = 30;
            sleekBox.sizeScale_X  = 1f;
            sleekBox.add(new SleekLabel
            {
                positionOffset_X = 5,
                sizeOffset_X     = -10,
                sizeScale_X      = 1f,
                sizeScale_Y      = 1f,
                fontAlignment    = TextAnchor.MiddleLeft,
                foregroundTint   = ESleekTint.NONE,
                isRich           = true,
                text             = text
            });
            return(sleekBox);
        }
Exemple #2
0
        // Token: 0x060036BA RID: 14010 RVA: 0x0017757C File Offset: 0x0017597C
        private static void updateProgressDisplay()
        {
            if (MenuPlayMatchmakingUI.progressBox == null)
            {
                return;
            }
            MenuPlayMatchmakingUI.progressBox.text = MenuPlayMatchmakingUI.localization.format("Progress_Matches", new object[]
            {
                (Provider.provider.matchmakingService.serverList == null) ? 0 : Provider.provider.matchmakingService.serverList.Count
            });
            SleekBox sleekBox = MenuPlayMatchmakingUI.progressBox;

            sleekBox.text += "\n";
            if (Provider.provider.matchmakingService.matchmakingBestServer != null)
            {
                SleekBox sleekBox2 = MenuPlayMatchmakingUI.progressBox;
                sleekBox2.text += MenuPlayMatchmakingUI.localization.format("Progress_Best", new object[]
                {
                    MenuPlayMatchmakingUI.localization.format("Match_Yes", new object[]
                    {
                        Provider.provider.matchmakingService.matchmakingBestServer.players,
                        Provider.provider.matchmakingService.matchmakingBestServer.maxPlayers,
                        Provider.provider.matchmakingService.matchmakingBestServer.ping
                    })
                });
            }
            else
            {
                SleekBox sleekBox3 = MenuPlayMatchmakingUI.progressBox;
                sleekBox3.text += MenuPlayMatchmakingUI.localization.format("Progress_Best", new object[]
                {
                    MenuPlayMatchmakingUI.localization.format("Match_No")
                });
            }
        }
Exemple #3
0
        public virtual Sleek createUI(Player player)
        {
            string value = this.formatReward(player);

            if (string.IsNullOrEmpty(value))
            {
                return(null);
            }
            SleekBox sleekBox = new SleekBox();

            sleekBox.sizeOffset_Y = 30;
            sleekBox.sizeScale_X  = 1f;
            sleekBox.add(new SleekLabel
            {
                positionOffset_X = 5,
                sizeOffset_X     = -10,
                sizeScale_X      = 1f,
                sizeScale_Y      = 1f,
                fontAlignment    = 3,
                foregroundTint   = ESleekTint.NONE,
                isRich           = true,
                text             = value
            });
            return(sleekBox);
        }
Exemple #4
0
        public override Sleek createUI(Player player)
        {
            string text = this.formatReward(player);

            if (string.IsNullOrEmpty(text))
            {
                return(null);
            }
            ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, this.id);

            if (itemAsset == null)
            {
                return(null);
            }
            SleekBox sleekBox = new SleekBox();

            if (itemAsset.size_y == 1)
            {
                sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 50 + 10);
            }
            else
            {
                sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 25 + 10);
            }
            sleekBox.sizeScale_X = 1f;
            SleekImageTexture sleekImageTexture = new SleekImageTexture();

            sleekImageTexture.positionOffset_X = 5;
            sleekImageTexture.positionOffset_Y = 5;
            if (itemAsset.size_y == 1)
            {
                sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 50);
                sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 50);
            }
            else
            {
                sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 25);
                sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 25);
            }
            sleekBox.add(sleekImageTexture);
            ItemTool.getIcon(this.id, 100, itemAsset.getState(false), itemAsset, sleekImageTexture.sizeOffset_X, sleekImageTexture.sizeOffset_Y, new ItemIconReady(sleekImageTexture.updateTexture));
            sleekBox.add(new SleekLabel
            {
                positionOffset_X = 10 + sleekImageTexture.sizeOffset_X,
                sizeOffset_X     = -15 - sleekImageTexture.sizeOffset_X,
                sizeScale_X      = 1f,
                sizeScale_Y      = 1f,
                fontAlignment    = 3,
                foregroundTint   = ESleekTint.NONE,
                isRich           = true,
                text             = text
            });
            return(sleekBox);
        }
Exemple #5
0
 // Token: 0x0600378B RID: 14219 RVA: 0x00185F3C File Offset: 0x0018433C
 private static void refresh()
 {
     MenuWorkshopErrorUI.errorBox.remove();
     for (int i = 0; i < Assets.errors.Count; i++)
     {
         SleekBox sleekBox = new SleekBox();
         sleekBox.positionOffset_Y = i * 60;
         sleekBox.sizeOffset_X     = -30;
         sleekBox.sizeOffset_Y     = 50;
         sleekBox.sizeScale_X      = 1f;
         sleekBox.text             = Assets.errors[i];
         MenuWorkshopErrorUI.errorBox.add(sleekBox);
     }
     MenuWorkshopErrorUI.errorBox.area     = new Rect(0f, 0f, 5f, (float)(Assets.errors.Count * 60 - 10));
     MenuWorkshopErrorUI.infoBox.isVisible = (Assets.errors.Count == 0);
 }
Exemple #6
0
 // Token: 0x06003791 RID: 14225 RVA: 0x0018641C File Offset: 0x0018481C
 private static void refresh()
 {
     MenuWorkshopLocalizationUI.messageBox.remove();
     for (int i = 0; i < Localization.messages.Count; i++)
     {
         SleekBox sleekBox = new SleekBox();
         sleekBox.positionOffset_Y = i * 60;
         sleekBox.sizeOffset_X     = -30;
         sleekBox.sizeOffset_Y     = 50;
         sleekBox.sizeScale_X      = 1f;
         sleekBox.text             = Localization.messages[i];
         MenuWorkshopLocalizationUI.messageBox.add(sleekBox);
     }
     MenuWorkshopLocalizationUI.messageBox.area   = new Rect(0f, 0f, 5f, (float)(Localization.messages.Count * 60 - 10));
     MenuWorkshopLocalizationUI.infoBox.isVisible = (Localization.messages.Count == 0);
 }
Exemple #7
0
        public virtual Sleek createUI(Player player, Texture2D icon)
        {
            string value = this.formatCondition(player);

            if (string.IsNullOrEmpty(value))
            {
                return(null);
            }
            SleekBox sleekBox = new SleekBox();

            sleekBox.sizeOffset_Y = 30;
            sleekBox.sizeScale_X  = 1f;
            if (icon != null)
            {
                sleekBox.add(new SleekImageTexture(icon)
                {
                    positionOffset_X = 5,
                    positionOffset_Y = 5,
                    sizeOffset_X     = 20,
                    sizeOffset_Y     = 20
                });
            }
            SleekLabel sleekLabel = new SleekLabel();

            if (icon != null)
            {
                sleekLabel.positionOffset_X = 30;
                sleekLabel.sizeOffset_X     = -35;
            }
            else
            {
                sleekLabel.positionOffset_X = 5;
                sleekLabel.sizeOffset_X     = -10;
            }
            sleekLabel.sizeScale_X    = 1f;
            sleekLabel.sizeScale_Y    = 1f;
            sleekLabel.fontAlignment  = 3;
            sleekLabel.foregroundTint = ESleekTint.NONE;
            sleekLabel.isRich         = true;
            sleekLabel.text           = value;
            sleekBox.add(sleekLabel);
            return(sleekBox);
        }
        private static void refresh()
        {
            MenuWorkshopSpawnsUI.rawField.isVisible  = false;
            MenuWorkshopSpawnsUI.rootsBox.isVisible  = true;
            MenuWorkshopSpawnsUI.tablesBox.isVisible = true;
            MenuWorkshopSpawnsUI.rootsBox.remove();
            MenuWorkshopSpawnsUI.tablesBox.remove();
            MenuWorkshopSpawnsUI.asset = (SpawnAsset)Assets.find(EAssetType.SPAWN, MenuWorkshopSpawnsUI.viewIDField.state);
            switch (MenuWorkshopSpawnsUI.typeButton.state)
            {
            case 0:
                MenuWorkshopSpawnsUI.type = EAssetType.ITEM;
                break;

            case 1:
                MenuWorkshopSpawnsUI.type = EAssetType.VEHICLE;
                break;

            case 2:
                MenuWorkshopSpawnsUI.type = EAssetType.ANIMAL;
                break;

            default:
                MenuWorkshopSpawnsUI.type = EAssetType.NONE;
                return;
            }
            int num = 120;

            MenuWorkshopSpawnsUI.rootsBox.positionOffset_Y = num;
            num += 40;
            if (MenuWorkshopSpawnsUI.asset != null)
            {
                MenuWorkshopSpawnsUI.rootsBox.text = MenuWorkshopSpawnsUI.localization.format("Roots_Box", new object[]
                {
                    MenuWorkshopSpawnsUI.viewIDField.state + " " + MenuWorkshopSpawnsUI.asset.name
                });
                for (int i = 0; i < MenuWorkshopSpawnsUI.asset.roots.Count; i++)
                {
                    SpawnTable spawnTable = MenuWorkshopSpawnsUI.asset.roots[i];
                    if (spawnTable.spawnID != 0)
                    {
                        SleekButton sleekButton = new SleekButton();
                        sleekButton.positionOffset_Y = 40 + i * 40;
                        sleekButton.sizeOffset_X     = -260;
                        sleekButton.sizeScale_X      = 1f;
                        sleekButton.sizeOffset_Y     = 30;
                        SleekButton sleekButton2 = sleekButton;
                        if (MenuWorkshopSpawnsUI.< > f__mg$cache0 == null)
                        {
                            MenuWorkshopSpawnsUI.< > f__mg$cache0 = new ClickedButton(MenuWorkshopSpawnsUI.onClickedRootButton);
                        }
                        sleekButton2.onClickedButton = MenuWorkshopSpawnsUI.< > f__mg$cache0;
                        MenuWorkshopSpawnsUI.rootsBox.add(sleekButton);
                        num += 40;
                        SpawnAsset spawnAsset = (SpawnAsset)Assets.find(EAssetType.SPAWN, spawnTable.spawnID);
                        if (spawnAsset != null)
                        {
                            sleekButton.text = spawnTable.spawnID + " " + spawnAsset.name;
                        }
                        else
                        {
                            sleekButton.text = spawnTable.spawnID + " ?";
                        }
                        SleekInt32Field sleekInt32Field = new SleekInt32Field();
                        sleekInt32Field.positionOffset_X = 10;
                        sleekInt32Field.positionScale_X  = 1f;
                        sleekInt32Field.sizeOffset_X     = 55;
                        sleekInt32Field.sizeOffset_Y     = 30;
                        sleekInt32Field.state            = spawnTable.weight;
                        sleekInt32Field.tooltip          = MenuWorkshopSpawnsUI.localization.format("Weight_Tooltip");
                        SleekInt32Field sleekInt32Field2 = sleekInt32Field;
                        Delegate        onTypedInt       = sleekInt32Field2.onTypedInt;
                        if (MenuWorkshopSpawnsUI.< > f__mg$cache1 == null)
                        {
                            MenuWorkshopSpawnsUI.< > f__mg$cache1 = new TypedInt32(MenuWorkshopSpawnsUI.onTypedRootWeightField);
                        }
                        sleekInt32Field2.onTypedInt = (TypedInt32)Delegate.Combine(onTypedInt, MenuWorkshopSpawnsUI.< > f__mg$cache1);
                        sleekButton.add(sleekInt32Field);
                        sleekButton.add(new SleekBox
                        {
                            positionOffset_X = 75,
                            positionScale_X  = 1f,
                            sizeOffset_X     = 55,
                            sizeOffset_Y     = 30,
                            text             = (Math.Round((double)(spawnTable.chance * 1000f)) / 10.0).ToString() + "%",
                            tooltip          = MenuWorkshopSpawnsUI.localization.format("Chance_Tooltip")
                        });
                        SleekButtonIcon sleekButtonIcon = new SleekButtonIcon((Texture2D)MenuWorkshopEditorUI.icons.load("Remove"));
                        sleekButtonIcon.positionOffset_X = 140;
                        sleekButtonIcon.positionScale_X  = 1f;
                        sleekButtonIcon.sizeOffset_X     = 120;
                        sleekButtonIcon.sizeOffset_Y     = 30;
                        sleekButtonIcon.text             = MenuWorkshopSpawnsUI.localization.format("Remove_Root_Button");
                        sleekButtonIcon.tooltip          = MenuWorkshopSpawnsUI.localization.format("Remove_Root_Button_Tooltip");
                        SleekButton sleekButton3 = sleekButtonIcon;
                        if (MenuWorkshopSpawnsUI.< > f__mg$cache2 == null)
                        {
                            MenuWorkshopSpawnsUI.< > f__mg$cache2 = new ClickedButton(MenuWorkshopSpawnsUI.onClickedRemoveRootButton);
                        }
                        sleekButton3.onClickedButton = MenuWorkshopSpawnsUI.< > f__mg$cache2;
                        sleekButton.add(sleekButtonIcon);
                    }
                }
                MenuWorkshopSpawnsUI.addRootIDField.positionOffset_Y     = num;
                MenuWorkshopSpawnsUI.addRootSpawnButton.positionOffset_Y = num;
                num += 40;
                MenuWorkshopSpawnsUI.addRootIDField.isVisible     = true;
                MenuWorkshopSpawnsUI.addRootSpawnButton.isVisible = true;
            }
            else
            {
                MenuWorkshopSpawnsUI.rootsBox.text = MenuWorkshopSpawnsUI.localization.format("Roots_Box", new object[]
                {
                    MenuWorkshopSpawnsUI.viewIDField.state + " ?"
                });
                MenuWorkshopSpawnsUI.addRootIDField.isVisible     = false;
                MenuWorkshopSpawnsUI.addRootSpawnButton.isVisible = false;
            }
            num += 40;
            MenuWorkshopSpawnsUI.tablesBox.positionOffset_Y = num;
            num += 40;
            if (MenuWorkshopSpawnsUI.asset != null)
            {
                MenuWorkshopSpawnsUI.tablesBox.text = MenuWorkshopSpawnsUI.localization.format("Tables_Box", new object[]
                {
                    MenuWorkshopSpawnsUI.viewIDField.state + " " + MenuWorkshopSpawnsUI.asset.name
                });
                for (int j = 0; j < MenuWorkshopSpawnsUI.asset.tables.Count; j++)
                {
                    SpawnTable spawnTable2 = MenuWorkshopSpawnsUI.asset.tables[j];
                    Sleek      sleek       = null;
                    if (spawnTable2.spawnID != 0)
                    {
                        SleekButton sleekButton4 = new SleekButton();
                        sleekButton4.positionOffset_Y = 40 + j * 40;
                        sleekButton4.sizeOffset_X     = -260;
                        sleekButton4.sizeScale_X      = 1f;
                        sleekButton4.sizeOffset_Y     = 30;
                        SleekButton sleekButton5 = sleekButton4;
                        if (MenuWorkshopSpawnsUI.< > f__mg$cache3 == null)
                        {
                            MenuWorkshopSpawnsUI.< > f__mg$cache3 = new ClickedButton(MenuWorkshopSpawnsUI.onClickedTableButton);
                        }
                        sleekButton5.onClickedButton = MenuWorkshopSpawnsUI.< > f__mg$cache3;
                        MenuWorkshopSpawnsUI.tablesBox.add(sleekButton4);
                        sleek = sleekButton4;
                        num  += 40;
                        SpawnAsset spawnAsset2 = (SpawnAsset)Assets.find(EAssetType.SPAWN, spawnTable2.spawnID);
                        if (spawnAsset2 != null)
                        {
                            sleekButton4.text = spawnTable2.spawnID + " " + spawnAsset2.name;
                        }
                        else
                        {
                            sleekButton4.text = spawnTable2.spawnID + " ?";
                        }
                    }
                    else if (spawnTable2.assetID != 0)
                    {
                        SleekBox sleekBox = new SleekBox();
                        sleekBox.positionOffset_Y = 40 + j * 40;
                        sleekBox.sizeOffset_X     = -260;
                        sleekBox.sizeScale_X      = 1f;
                        sleekBox.sizeOffset_Y     = 30;
                        MenuWorkshopSpawnsUI.tablesBox.add(sleekBox);
                        sleek = sleekBox;
                        num  += 40;
                        Asset asset = Assets.find(MenuWorkshopSpawnsUI.type, spawnTable2.assetID);
                        if (asset != null)
                        {
                            sleekBox.text = spawnTable2.assetID + " " + asset.name;
                            if (MenuWorkshopSpawnsUI.type == EAssetType.ITEM)
                            {
                                ItemAsset itemAsset = asset as ItemAsset;
                                if (MenuWorkshopSpawnsUI.asset != null)
                                {
                                    sleekBox.foregroundTint  = ESleekTint.NONE;
                                    sleekBox.foregroundColor = ItemTool.getRarityColorUI(itemAsset.rarity);
                                }
                            }
                            else if (MenuWorkshopSpawnsUI.type == EAssetType.VEHICLE)
                            {
                                VehicleAsset vehicleAsset = asset as VehicleAsset;
                                if (MenuWorkshopSpawnsUI.asset != null)
                                {
                                    sleekBox.foregroundTint  = ESleekTint.NONE;
                                    sleekBox.foregroundColor = ItemTool.getRarityColorUI(vehicleAsset.rarity);
                                }
                            }
                        }
                        else
                        {
                            sleekBox.text = spawnTable2.assetID + " ?";
                        }
                    }
                    if (sleek != null)
                    {
                        SleekInt32Field sleekInt32Field3 = new SleekInt32Field();
                        sleekInt32Field3.positionOffset_X = 10;
                        sleekInt32Field3.positionScale_X  = 1f;
                        sleekInt32Field3.sizeOffset_X     = 55;
                        sleekInt32Field3.sizeOffset_Y     = 30;
                        sleekInt32Field3.state            = spawnTable2.weight;
                        sleekInt32Field3.tooltip          = MenuWorkshopSpawnsUI.localization.format("Weight_Tooltip");
                        SleekInt32Field sleekInt32Field4 = sleekInt32Field3;
                        Delegate        onTypedInt2      = sleekInt32Field4.onTypedInt;
                        if (MenuWorkshopSpawnsUI.< > f__mg$cache4 == null)
                        {
                            MenuWorkshopSpawnsUI.< > f__mg$cache4 = new TypedInt32(MenuWorkshopSpawnsUI.onTypedTableWeightField);
                        }
                        sleekInt32Field4.onTypedInt = (TypedInt32)Delegate.Combine(onTypedInt2, MenuWorkshopSpawnsUI.< > f__mg$cache4);
                        sleek.add(sleekInt32Field3);
                        float num2 = spawnTable2.chance;
                        if (j > 0)
                        {
                            num2 -= MenuWorkshopSpawnsUI.asset.tables[j - 1].chance;
                        }
                        sleek.add(new SleekBox
                        {
                            positionOffset_X = 75,
                            positionScale_X  = 1f,
                            sizeOffset_X     = 55,
                            sizeOffset_Y     = 30,
                            text             = (Math.Round((double)(num2 * 1000f)) / 10.0).ToString() + "%",
                            tooltip          = MenuWorkshopSpawnsUI.localization.format("Chance_Tooltip")
                        });
                        SleekButtonIcon sleekButtonIcon2 = new SleekButtonIcon((Texture2D)MenuWorkshopEditorUI.icons.load("Remove"));
                        sleekButtonIcon2.positionOffset_X = 140;
                        sleekButtonIcon2.positionScale_X  = 1f;
                        sleekButtonIcon2.sizeOffset_X     = 120;
                        sleekButtonIcon2.sizeOffset_Y     = 30;
                        sleekButtonIcon2.text             = MenuWorkshopSpawnsUI.localization.format("Remove_Table_Button");
                        sleekButtonIcon2.tooltip          = MenuWorkshopSpawnsUI.localization.format("Remove_Table_Button_Tooltip");
                        SleekButton sleekButton6 = sleekButtonIcon2;
                        if (MenuWorkshopSpawnsUI.< > f__mg$cache5 == null)
                        {
                            MenuWorkshopSpawnsUI.< > f__mg$cache5 = new ClickedButton(MenuWorkshopSpawnsUI.onClickedRemoveTableButton);
                        }
                        sleekButton6.onClickedButton = MenuWorkshopSpawnsUI.< > f__mg$cache5;
                        sleek.add(sleekButtonIcon2);
                    }
                }
                MenuWorkshopSpawnsUI.addTableIDField.positionOffset_Y     = num;
                MenuWorkshopSpawnsUI.addTableAssetButton.positionOffset_Y = num;
                MenuWorkshopSpawnsUI.addTableSpawnButton.positionOffset_Y = num;
                num += 40;
                MenuWorkshopSpawnsUI.addTableIDField.isVisible     = true;
                MenuWorkshopSpawnsUI.addTableAssetButton.isVisible = true;
                MenuWorkshopSpawnsUI.addTableSpawnButton.isVisible = true;
            }
            else
            {
                MenuWorkshopSpawnsUI.tablesBox.text = MenuWorkshopSpawnsUI.localization.format("Tables_Box", new object[]
                {
                    MenuWorkshopSpawnsUI.viewIDField.state + " ?"
                });
                MenuWorkshopSpawnsUI.addTableIDField.isVisible     = false;
                MenuWorkshopSpawnsUI.addTableAssetButton.isVisible = false;
                MenuWorkshopSpawnsUI.addTableSpawnButton.isVisible = false;
            }
            if (MenuWorkshopSpawnsUI.asset != null)
            {
                MenuWorkshopSpawnsUI.applyWeightsButton.positionOffset_Y = num;
                num += 40;
                MenuWorkshopSpawnsUI.applyWeightsButton.isVisible = true;
            }
            else
            {
                MenuWorkshopSpawnsUI.applyWeightsButton.isVisible = false;
            }
            MenuWorkshopSpawnsUI.spawnsBox.area = new Rect(0f, 0f, 5f, (float)(num - 10));
        }
        public override Sleek createUI(Player player, Texture2D icon)
        {
            string text = this.formatCondition(player);

            if (string.IsNullOrEmpty(text))
            {
                return(null);
            }
            ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, this.id);

            if (itemAsset == null)
            {
                return(null);
            }
            SleekBox sleekBox = new SleekBox();

            if (itemAsset.size_y == 1)
            {
                sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 50 + 10);
            }
            else
            {
                sleekBox.sizeOffset_Y = (int)(itemAsset.size_y * 25 + 10);
            }
            sleekBox.sizeScale_X = 1f;
            if (icon != null)
            {
                sleekBox.add(new SleekImageTexture(icon)
                {
                    positionOffset_X = 5,
                    positionOffset_Y = -10,
                    positionScale_Y  = 0.5f,
                    sizeOffset_X     = 20,
                    sizeOffset_Y     = 20
                });
            }
            SleekImageTexture sleekImageTexture = new SleekImageTexture();

            if (icon != null)
            {
                sleekImageTexture.positionOffset_X = 30;
            }
            else
            {
                sleekImageTexture.positionOffset_X = 5;
            }
            sleekImageTexture.positionOffset_Y = 5;
            if (itemAsset.size_y == 1)
            {
                sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 50);
                sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 50);
            }
            else
            {
                sleekImageTexture.sizeOffset_X = (int)(itemAsset.size_x * 25);
                sleekImageTexture.sizeOffset_Y = (int)(itemAsset.size_y * 25);
            }
            sleekBox.add(sleekImageTexture);
            ItemTool.getIcon(this.id, 100, itemAsset.getState(false), itemAsset, sleekImageTexture.sizeOffset_X, sleekImageTexture.sizeOffset_Y, new ItemIconReady(sleekImageTexture.updateTexture));
            SleekLabel sleekLabel = new SleekLabel();

            if (icon != null)
            {
                sleekLabel.positionOffset_X = 35 + sleekImageTexture.sizeOffset_X;
                sleekLabel.sizeOffset_X     = -40 - sleekImageTexture.sizeOffset_X;
            }
            else
            {
                sleekLabel.positionOffset_X = 10 + sleekImageTexture.sizeOffset_X;
                sleekLabel.sizeOffset_X     = -15 - sleekImageTexture.sizeOffset_X;
            }
            sleekLabel.sizeScale_X    = 1f;
            sleekLabel.sizeScale_Y    = 1f;
            sleekLabel.fontAlignment  = 3;
            sleekLabel.foregroundTint = ESleekTint.NONE;
            sleekLabel.isRich         = true;
            sleekLabel.text           = text;
            sleekBox.add(sleekLabel);
            return(sleekBox);
        }
        private static void refreshConfig()
        {
            MenuPlayConfigUI.configBox.remove();
            MenuPlayConfigUI.configOffset = 0;
            MenuPlayConfigUI.configGroups.Clear();
            Type type = MenuPlayConfigUI.modeConfigData.GetType();

            foreach (FieldInfo fieldInfo in type.GetFields())
            {
                SleekBox sleekBox = new SleekBox();
                sleekBox.positionOffset_Y = MenuPlayConfigUI.configOffset;
                sleekBox.sizeOffset_X     = -30;
                sleekBox.sizeOffset_Y     = 30;
                sleekBox.sizeScale_X      = 1f;
                sleekBox.text             = MenuPlayConfigUI.localization.format(fieldInfo.Name);
                MenuPlayConfigUI.configBox.add(sleekBox);
                int num = 40;
                MenuPlayConfigUI.configOffset += 40;
                object value = fieldInfo.GetValue(MenuPlayConfigUI.modeConfigData);
                Type   type2 = value.GetType();
                foreach (FieldInfo fieldInfo2 in type2.GetFields())
                {
                    object value2 = fieldInfo2.GetValue(value);
                    Type   type3  = value2.GetType();
                    if (type3 == typeof(uint))
                    {
                        SleekUInt32Field sleekUInt32Field = new SleekUInt32Field();
                        sleekUInt32Field.positionOffset_Y = num;
                        sleekUInt32Field.sizeOffset_X     = 200;
                        sleekUInt32Field.sizeOffset_Y     = 30;
                        sleekUInt32Field.state            = (uint)value2;
                        sleekUInt32Field.addLabel(MenuPlayConfigUI.localization.format(fieldInfo2.Name), ESleekSide.RIGHT);
                        SleekUInt32Field sleekUInt32Field2 = sleekUInt32Field;
                        Delegate         onTypedUInt       = sleekUInt32Field2.onTypedUInt32;
                        if (MenuPlayConfigUI.< > f__mg$cache0 == null)
                        {
                            MenuPlayConfigUI.< > f__mg$cache0 = new TypedUInt32(MenuPlayConfigUI.onTypedUInt32);
                        }
                        sleekUInt32Field2.onTypedUInt32 = (TypedUInt32)Delegate.Combine(onTypedUInt, MenuPlayConfigUI.< > f__mg$cache0);
                        sleekBox.add(sleekUInt32Field);
                        num += 40;
                        MenuPlayConfigUI.configOffset += 40;
                    }
                    else if (type3 == typeof(float))
                    {
                        SleekSingleField sleekSingleField = new SleekSingleField();
                        sleekSingleField.positionOffset_Y = num;
                        sleekSingleField.sizeOffset_X     = 200;
                        sleekSingleField.sizeOffset_Y     = 30;
                        sleekSingleField.state            = (float)value2;
                        sleekSingleField.addLabel(MenuPlayConfigUI.localization.format(fieldInfo2.Name), ESleekSide.RIGHT);
                        SleekSingleField sleekSingleField2 = sleekSingleField;
                        Delegate         onTypedSingle     = sleekSingleField2.onTypedSingle;
                        if (MenuPlayConfigUI.< > f__mg$cache1 == null)
                        {
                            MenuPlayConfigUI.< > f__mg$cache1 = new TypedSingle(MenuPlayConfigUI.onTypedSingle);
                        }
                        sleekSingleField2.onTypedSingle = (TypedSingle)Delegate.Combine(onTypedSingle, MenuPlayConfigUI.< > f__mg$cache1);
                        sleekBox.add(sleekSingleField);
                        num += 40;
                        MenuPlayConfigUI.configOffset += 40;
                    }
                    else if (type3 == typeof(bool))
                    {
                        SleekToggle sleekToggle = new SleekToggle();
                        sleekToggle.positionOffset_Y = num;
                        sleekToggle.sizeOffset_X     = 40;
                        sleekToggle.sizeOffset_Y     = 40;
                        sleekToggle.state            = (bool)value2;
                        sleekToggle.addLabel(MenuPlayConfigUI.localization.format(fieldInfo2.Name), ESleekSide.RIGHT);
                        SleekToggle sleekToggle2 = sleekToggle;
                        Delegate    onToggled    = sleekToggle2.onToggled;
                        if (MenuPlayConfigUI.< > f__mg$cache2 == null)
                        {
                            MenuPlayConfigUI.< > f__mg$cache2 = new Toggled(MenuPlayConfigUI.onToggled);
                        }
                        sleekToggle2.onToggled = (Toggled)Delegate.Combine(onToggled, MenuPlayConfigUI.< > f__mg$cache2);
                        sleekBox.add(sleekToggle);
                        num += 50;
                        MenuPlayConfigUI.configOffset += 50;
                    }
                }
                MenuPlayConfigUI.configOffset += 40;
                MenuPlayConfigUI.configGroups.Add(value);
            }
            MenuPlayConfigUI.configBox.area = new Rect(0f, 0f, 5f, (float)(MenuPlayConfigUI.configOffset - 50));
        }
Exemple #11
0
        // Token: 0x06003794 RID: 14228 RVA: 0x001864F4 File Offset: 0x001848F4
        public MenuWorkshopModulesUI()
        {
            MenuWorkshopModulesUI.localization = Localization.read("/Menu/Workshop/MenuWorkshopModules.dat");
            MenuWorkshopModulesUI.container    = new Sleek();
            MenuWorkshopModulesUI.container.positionOffset_X = 10;
            MenuWorkshopModulesUI.container.positionOffset_Y = 10;
            MenuWorkshopModulesUI.container.positionScale_Y  = 1f;
            MenuWorkshopModulesUI.container.sizeOffset_X     = -20;
            MenuWorkshopModulesUI.container.sizeOffset_Y     = -20;
            MenuWorkshopModulesUI.container.sizeScale_X      = 1f;
            MenuWorkshopModulesUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuWorkshopModulesUI.container);
            MenuWorkshopModulesUI.active    = false;
            MenuWorkshopModulesUI.headerBox = new SleekBox();
            MenuWorkshopModulesUI.headerBox.sizeOffset_Y = 50;
            MenuWorkshopModulesUI.headerBox.sizeScale_X  = 1f;
            MenuWorkshopModulesUI.headerBox.fontSize     = 14;
            MenuWorkshopModulesUI.headerBox.text         = MenuWorkshopModulesUI.localization.format("Header");
            MenuWorkshopModulesUI.container.add(MenuWorkshopModulesUI.headerBox);
            MenuWorkshopModulesUI.moduleBox = new SleekScrollBox();
            MenuWorkshopModulesUI.moduleBox.positionOffset_Y = 60;
            MenuWorkshopModulesUI.moduleBox.sizeOffset_Y     = -120;
            MenuWorkshopModulesUI.moduleBox.sizeScale_X      = 1f;
            MenuWorkshopModulesUI.moduleBox.sizeScale_Y      = 1f;
            MenuWorkshopModulesUI.moduleBox.area             = new Rect(0f, 0f, 5f, 0f);
            MenuWorkshopModulesUI.container.add(MenuWorkshopModulesUI.moduleBox);
            if (ModuleHook.modules.Count == 0)
            {
                SleekBox sleekBox = new SleekBox();
                sleekBox.positionOffset_Y = 60;
                sleekBox.sizeOffset_X     = -30;
                sleekBox.sizeOffset_Y     = 50;
                sleekBox.sizeScale_X      = 1f;
                sleekBox.fontSize         = 14;
                sleekBox.text             = MenuWorkshopModulesUI.localization.format("No_Modules");
                MenuWorkshopModulesUI.container.add(sleekBox);
            }
            else
            {
                for (int i = 0; i < ModuleHook.modules.Count; i++)
                {
                    ModuleConfig config    = ModuleHook.modules[i].config;
                    Local        local     = Localization.tryRead(config.DirectoryPath, false);
                    SleekBox     sleekBox2 = new SleekBox();
                    sleekBox2.positionOffset_Y = i * 130;
                    sleekBox2.sizeOffset_X     = -30;
                    sleekBox2.sizeOffset_Y     = 120;
                    sleekBox2.sizeScale_X      = 1f;
                    SleekToggle sleekToggle = new SleekToggle();
                    sleekToggle.positionOffset_X = 5;
                    sleekToggle.positionOffset_Y = -20;
                    sleekToggle.positionScale_Y  = 0.5f;
                    sleekToggle.sizeOffset_X     = 40;
                    sleekToggle.sizeOffset_Y     = 40;
                    sleekToggle.state            = config.IsEnabled;
                    SleekToggle sleekToggle2 = sleekToggle;
                    if (MenuWorkshopModulesUI.< > f__mg$cache0 == null)
                    {
                        MenuWorkshopModulesUI.< > f__mg$cache0 = new Toggled(MenuWorkshopModulesUI.onToggledModuleToggle);
                    }
                    sleekToggle2.onToggled = MenuWorkshopModulesUI.< > f__mg$cache0;
                    sleekBox2.add(sleekToggle);
                    SleekLabel sleekLabel = new SleekLabel();
                    sleekLabel.positionOffset_X = 50;
                    sleekLabel.positionOffset_Y = 5;
                    sleekLabel.sizeOffset_X     = -55;
                    sleekLabel.sizeOffset_Y     = 30;
                    sleekLabel.sizeScale_X      = 1f;
                    sleekLabel.fontSize         = 14;
                    sleekLabel.fontAlignment    = TextAnchor.UpperLeft;
                    sleekLabel.text             = local.format("Name");
                    sleekBox2.add(sleekLabel);
                    SleekLabel sleekLabel2 = new SleekLabel();
                    sleekLabel2.positionOffset_X = 50;
                    sleekLabel2.positionOffset_Y = 30;
                    sleekLabel2.sizeOffset_X     = -55;
                    sleekLabel2.sizeOffset_Y     = 25;
                    sleekLabel2.sizeScale_X      = 1f;
                    sleekLabel2.fontAlignment    = TextAnchor.UpperLeft;
                    sleekLabel2.text             = MenuWorkshopModulesUI.localization.format("Version", new object[]
                    {
                        config.Version
                    });
                    sleekBox2.add(sleekLabel2);
                    SleekLabel sleekLabel3 = new SleekLabel();
                    sleekLabel3.positionOffset_X = 50;
                    sleekLabel3.positionOffset_Y = 50;
                    sleekLabel3.sizeOffset_X     = -55;
                    sleekLabel3.sizeOffset_Y     = 65;
                    sleekLabel3.sizeScale_X      = 1f;
                    sleekLabel3.fontSize         = 12;
                    sleekLabel3.fontAlignment    = TextAnchor.UpperLeft;
                    sleekLabel3.text             = local.format("Description");
                    sleekBox2.add(sleekLabel3);
                    if (ReadWrite.fileExists(config.DirectoryPath + "/Icon.png", false, false))
                    {
                        byte[]    data      = ReadWrite.readBytes(config.DirectoryPath + "/Icon.png", false, false);
                        Texture2D texture2D = new Texture2D(100, 100, TextureFormat.ARGB32, false, true);
                        texture2D.name      = "Module_" + config.Name + "_Icon";
                        texture2D.hideFlags = HideFlags.HideAndDontSave;
                        texture2D.LoadImage(data);
                        sleekBox2.add(new SleekImageTexture
                        {
                            positionOffset_X     = 50,
                            positionOffset_Y     = 10,
                            sizeOffset_X         = 100,
                            sizeOffset_Y         = 100,
                            texture              = texture2D,
                            shouldDestroyTexture = true
                        });
                        sleekLabel.positionOffset_X  += 105;
                        sleekLabel.sizeOffset_X      -= 105;
                        sleekLabel2.positionOffset_X += 105;
                        sleekLabel2.sizeOffset_X     -= 105;
                        sleekLabel3.positionOffset_X += 105;
                        sleekLabel3.sizeOffset_X     -= 105;
                    }
                    MenuWorkshopModulesUI.moduleBox.add(sleekBox2);
                }
                MenuWorkshopModulesUI.moduleBox.area = new Rect(0f, 0f, 5f, (float)(ModuleHook.modules.Count * 130 - 10));
            }
            MenuWorkshopModulesUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuWorkshopModulesUI.backButton.positionOffset_Y = -50;
            MenuWorkshopModulesUI.backButton.positionScale_Y  = 1f;
            MenuWorkshopModulesUI.backButton.sizeOffset_X     = 200;
            MenuWorkshopModulesUI.backButton.sizeOffset_Y     = 50;
            MenuWorkshopModulesUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuWorkshopModulesUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton = MenuWorkshopModulesUI.backButton;

            if (MenuWorkshopModulesUI.< > f__mg$cache1 == null)
            {
                MenuWorkshopModulesUI.< > f__mg$cache1 = new ClickedButton(MenuWorkshopModulesUI.onClickedBackButton);
            }
            sleekButton.onClickedButton = MenuWorkshopModulesUI.< > f__mg$cache1;
            MenuWorkshopModulesUI.backButton.fontSize = 14;
            MenuWorkshopModulesUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopModulesUI.container.add(MenuWorkshopModulesUI.backButton);
        }
Exemple #12
0
        // Token: 0x060035E0 RID: 13792 RVA: 0x0016B0D8 File Offset: 0x001694D8
        public MenuConfigurationControlsUI()
        {
            MenuConfigurationControlsUI.localization = Localization.read("/Menu/Configuration/MenuConfigurationControls.dat");
            MenuConfigurationControlsUI.container    = new Sleek();
            MenuConfigurationControlsUI.container.positionOffset_X = 10;
            MenuConfigurationControlsUI.container.positionOffset_Y = 10;
            MenuConfigurationControlsUI.container.positionScale_Y  = 1f;
            MenuConfigurationControlsUI.container.sizeOffset_X     = -20;
            MenuConfigurationControlsUI.container.sizeOffset_Y     = -20;
            MenuConfigurationControlsUI.container.sizeScale_X      = 1f;
            MenuConfigurationControlsUI.container.sizeScale_Y      = 1f;
            if (Provider.isConnected)
            {
                PlayerUI.container.add(MenuConfigurationControlsUI.container);
            }
            else
            {
                MenuUI.container.add(MenuConfigurationControlsUI.container);
            }
            MenuConfigurationControlsUI.active      = false;
            MenuConfigurationControlsUI.binding     = byte.MaxValue;
            MenuConfigurationControlsUI.controlsBox = new SleekScrollBox();
            MenuConfigurationControlsUI.controlsBox.positionOffset_X = -200;
            MenuConfigurationControlsUI.controlsBox.positionOffset_Y = 100;
            MenuConfigurationControlsUI.controlsBox.positionScale_X  = 0.5f;
            MenuConfigurationControlsUI.controlsBox.sizeOffset_X     = 430;
            MenuConfigurationControlsUI.controlsBox.sizeOffset_Y     = -200;
            MenuConfigurationControlsUI.controlsBox.sizeScale_Y      = 1f;
            MenuConfigurationControlsUI.controlsBox.area             = new Rect(0f, 0f, 5f, (float)(380 + (ControlsSettings.bindings.Length + (MenuConfigurationControlsUI.layouts.Length - 1) * 2) * 40 - 10));
            MenuConfigurationControlsUI.container.add(MenuConfigurationControlsUI.controlsBox);
            MenuConfigurationControlsUI.sensitivityField = new SleekSingleField();
            MenuConfigurationControlsUI.sensitivityField.positionOffset_Y = 100;
            MenuConfigurationControlsUI.sensitivityField.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.sensitivityField.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.sensitivityField.addLabel(MenuConfigurationControlsUI.localization.format("Sensitivity_Field_Label"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField = MenuConfigurationControlsUI.sensitivityField;

            if (MenuConfigurationControlsUI.< > f__mg$cache0 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache0 = new TypedSingle(MenuConfigurationControlsUI.onTypedSensitivityField);
            }
            sleekSingleField.onTypedSingle = MenuConfigurationControlsUI.< > f__mg$cache0;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.sensitivityField);
            MenuConfigurationControlsUI.invertToggle = new SleekToggle();
            MenuConfigurationControlsUI.invertToggle.sizeOffset_X = 40;
            MenuConfigurationControlsUI.invertToggle.sizeOffset_Y = 40;
            MenuConfigurationControlsUI.invertToggle.addLabel(MenuConfigurationControlsUI.localization.format("Invert_Toggle_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = MenuConfigurationControlsUI.invertToggle;

            if (MenuConfigurationControlsUI.< > f__mg$cache1 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache1 = new Toggled(MenuConfigurationControlsUI.onToggledInvertToggle);
            }
            sleekToggle.onToggled = MenuConfigurationControlsUI.< > f__mg$cache1;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.invertToggle);
            MenuConfigurationControlsUI.invertFlightToggle = new SleekToggle();
            MenuConfigurationControlsUI.invertFlightToggle.positionOffset_Y = 50;
            MenuConfigurationControlsUI.invertFlightToggle.sizeOffset_X     = 40;
            MenuConfigurationControlsUI.invertFlightToggle.sizeOffset_Y     = 40;
            MenuConfigurationControlsUI.invertFlightToggle.addLabel(MenuConfigurationControlsUI.localization.format("Invert_Flight_Toggle_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = MenuConfigurationControlsUI.invertFlightToggle;

            if (MenuConfigurationControlsUI.< > f__mg$cache2 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache2 = new Toggled(MenuConfigurationControlsUI.onToggledInvertFlightToggle);
            }
            sleekToggle2.onToggled = MenuConfigurationControlsUI.< > f__mg$cache2;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.invertFlightToggle);
            MenuConfigurationControlsUI.aimingButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.aimingButton.positionOffset_Y = 140;
            MenuConfigurationControlsUI.aimingButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.aimingButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.aimingButton.addLabel(MenuConfigurationControlsUI.localization.format("Aiming_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState = MenuConfigurationControlsUI.aimingButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache3 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache3 = new SwappedState(MenuConfigurationControlsUI.onSwappedAimingState);
            }
            sleekButtonState.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache3;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.aimingButton);
            MenuConfigurationControlsUI.crouchingButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.crouchingButton.positionOffset_Y = 180;
            MenuConfigurationControlsUI.crouchingButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.crouchingButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.crouchingButton.addLabel(MenuConfigurationControlsUI.localization.format("Crouching_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState2 = MenuConfigurationControlsUI.crouchingButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache4 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache4 = new SwappedState(MenuConfigurationControlsUI.onSwappedCrouchingState);
            }
            sleekButtonState2.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache4;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.crouchingButton);
            MenuConfigurationControlsUI.proningButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.proningButton.positionOffset_Y = 220;
            MenuConfigurationControlsUI.proningButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.proningButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.proningButton.addLabel(MenuConfigurationControlsUI.localization.format("Proning_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState3 = MenuConfigurationControlsUI.proningButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache5 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache5 = new SwappedState(MenuConfigurationControlsUI.onSwappedProningState);
            }
            sleekButtonState3.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache5;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.proningButton);
            MenuConfigurationControlsUI.sprintingButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.sprintingButton.positionOffset_Y = 260;
            MenuConfigurationControlsUI.sprintingButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.sprintingButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.sprintingButton.addLabel(MenuConfigurationControlsUI.localization.format("Sprinting_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState4 = MenuConfigurationControlsUI.sprintingButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache6 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache6 = new SwappedState(MenuConfigurationControlsUI.onSwappedSprintingState);
            }
            sleekButtonState4.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache6;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.sprintingButton);
            MenuConfigurationControlsUI.leaningButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuConfigurationControlsUI.localization.format("Hold")),
                new GUIContent(MenuConfigurationControlsUI.localization.format("Toggle"))
            });
            MenuConfigurationControlsUI.leaningButton.positionOffset_Y = 300;
            MenuConfigurationControlsUI.leaningButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.leaningButton.sizeOffset_Y     = 30;
            MenuConfigurationControlsUI.leaningButton.addLabel(MenuConfigurationControlsUI.localization.format("Leaning_Label"), ESleekSide.RIGHT);
            SleekButtonState sleekButtonState5 = MenuConfigurationControlsUI.leaningButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache7 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache7 = new SwappedState(MenuConfigurationControlsUI.onSwappedLeaningState);
            }
            sleekButtonState5.onSwappedState = MenuConfigurationControlsUI.< > f__mg$cache7;
            MenuConfigurationControlsUI.controlsBox.add(MenuConfigurationControlsUI.leaningButton);
            MenuConfigurationControlsUI.buttons = new SleekButton[ControlsSettings.bindings.Length];
            byte b  = 0;
            byte b2 = 0;

            while ((int)b2 < MenuConfigurationControlsUI.layouts.Length)
            {
                SleekBox sleekBox = new SleekBox();
                sleekBox.positionOffset_Y = 340 + (int)((b + b2 * 2) * 40);
                sleekBox.sizeOffset_X     = -30;
                sleekBox.sizeOffset_Y     = 30;
                sleekBox.sizeScale_X      = 1f;
                sleekBox.text             = MenuConfigurationControlsUI.localization.format("Layout_" + b2);
                MenuConfigurationControlsUI.controlsBox.add(sleekBox);
                byte b3 = 0;
                while ((int)b3 < MenuConfigurationControlsUI.layouts[(int)b2].Length)
                {
                    SleekButton sleekButton = new SleekButton();
                    sleekButton.positionOffset_Y = (int)((b3 + 1) * 40);
                    sleekButton.sizeOffset_Y     = 30;
                    sleekButton.sizeScale_X      = 1f;
                    SleekButton sleekButton2 = sleekButton;
                    if (MenuConfigurationControlsUI.< > f__mg$cache8 == null)
                    {
                        MenuConfigurationControlsUI.< > f__mg$cache8 = new ClickedButton(MenuConfigurationControlsUI.onClickedKeyButton);
                    }
                    sleekButton2.onClickedButton = MenuConfigurationControlsUI.< > f__mg$cache8;
                    sleekBox.add(sleekButton);
                    MenuConfigurationControlsUI.buttons[(int)MenuConfigurationControlsUI.layouts[(int)b2][(int)b3]] = sleekButton;
                    b  += 1;
                    b3 += 1;
                }
                b2 += 1;
            }
            MenuConfigurationControlsUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuConfigurationControlsUI.backButton.positionOffset_Y = -50;
            MenuConfigurationControlsUI.backButton.positionScale_Y  = 1f;
            MenuConfigurationControlsUI.backButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.backButton.sizeOffset_Y     = 50;
            MenuConfigurationControlsUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuConfigurationControlsUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton3 = MenuConfigurationControlsUI.backButton;

            if (MenuConfigurationControlsUI.< > f__mg$cache9 == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cache9 = new ClickedButton(MenuConfigurationControlsUI.onClickedBackButton);
            }
            sleekButton3.onClickedButton = MenuConfigurationControlsUI.< > f__mg$cache9;
            MenuConfigurationControlsUI.backButton.fontSize = 14;
            MenuConfigurationControlsUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationControlsUI.container.add(MenuConfigurationControlsUI.backButton);
            MenuConfigurationControlsUI.defaultButton = new SleekButton();
            MenuConfigurationControlsUI.defaultButton.positionOffset_X = -200;
            MenuConfigurationControlsUI.defaultButton.positionOffset_Y = -50;
            MenuConfigurationControlsUI.defaultButton.positionScale_X  = 1f;
            MenuConfigurationControlsUI.defaultButton.positionScale_Y  = 1f;
            MenuConfigurationControlsUI.defaultButton.sizeOffset_X     = 200;
            MenuConfigurationControlsUI.defaultButton.sizeOffset_Y     = 50;
            MenuConfigurationControlsUI.defaultButton.text             = MenuPlayConfigUI.localization.format("Default");
            MenuConfigurationControlsUI.defaultButton.tooltip          = MenuPlayConfigUI.localization.format("Default_Tooltip");
            SleekButton sleekButton4 = MenuConfigurationControlsUI.defaultButton;

            if (MenuConfigurationControlsUI.< > f__mg$cacheA == null)
            {
                MenuConfigurationControlsUI.< > f__mg$cacheA = new ClickedButton(MenuConfigurationControlsUI.onClickedDefaultButton);
            }
            sleekButton4.onClickedButton = MenuConfigurationControlsUI.< > f__mg$cacheA;
            MenuConfigurationControlsUI.defaultButton.fontSize = 14;
            MenuConfigurationControlsUI.container.add(MenuConfigurationControlsUI.defaultButton);
            MenuConfigurationControlsUI.updateAll();
        }
Exemple #13
0
        public SleekPlayer(SteamPlayer newPlayer, bool isButton, SleekPlayer.ESleekPlayerDisplayContext context)
        {
            this.player  = newPlayer;
            this.context = context;
            base.init();
            Texture2D texture;

            if (OptionsSettings.streamer)
            {
                texture = null;
            }
            else if (Provider.isServer)
            {
                texture = Provider.provider.communityService.getIcon(Provider.user);
            }
            else
            {
                texture = Provider.provider.communityService.getIcon(this.player.playerID.steamID);
            }
            if (isButton)
            {
                SleekButton sleekButton = new SleekButton();
                sleekButton.sizeScale_X     = 1f;
                sleekButton.sizeScale_Y     = 1f;
                sleekButton.tooltip         = this.player.playerID.playerName;
                sleekButton.fontSize        = 14;
                sleekButton.onClickedButton = new ClickedButton(this.onClickedPlayerButton);
                base.add(sleekButton);
                this.box = sleekButton;
            }
            else
            {
                SleekBox sleekBox = new SleekBox();
                sleekBox.sizeScale_X = 1f;
                sleekBox.sizeScale_Y = 1f;
                sleekBox.tooltip     = this.player.playerID.playerName;
                sleekBox.fontSize    = 14;
                base.add(sleekBox);
                this.box = sleekBox;
            }
            this.avatarImage = new SleekImageTexture();
            this.avatarImage.positionOffset_X     = 9;
            this.avatarImage.positionOffset_Y     = 9;
            this.avatarImage.sizeOffset_X         = 32;
            this.avatarImage.sizeOffset_Y         = 32;
            this.avatarImage.texture              = texture;
            this.avatarImage.shouldDestroyTexture = true;
            this.box.add(this.avatarImage);
            if (this.player.player != null && this.player.player.skills != null)
            {
                this.repImage = new SleekImageTexture();
                this.repImage.positionOffset_X = 46;
                this.repImage.positionOffset_Y = 9;
                this.repImage.sizeOffset_X     = 32;
                this.repImage.sizeOffset_Y     = 32;
                this.repImage.texture          = PlayerTool.getRepTexture(this.player.player.skills.reputation);
                this.repImage.backgroundColor  = PlayerTool.getRepColor(this.player.player.skills.reputation);
                this.box.add(this.repImage);
            }
            this.nameLabel = new SleekLabel();
            this.nameLabel.positionOffset_X = 83;
            this.nameLabel.sizeOffset_X     = -113;
            this.nameLabel.sizeOffset_Y     = 30;
            this.nameLabel.sizeScale_X      = 1f;
            if (this.player.player.quests.isMemberOfSameGroupAs(Player.player))
            {
                if (this.player.playerID.nickName != string.Empty && this.player.playerID.steamID != Provider.client)
                {
                    this.nameLabel.text = this.player.playerID.nickName;
                }
                else
                {
                    this.nameLabel.text = this.player.playerID.characterName;
                }
            }
            else
            {
                this.nameLabel.text = this.player.playerID.characterName;
            }
            this.nameLabel.fontSize = 14;
            this.box.add(this.nameLabel);
            if (this.player.player != null && this.player.player.skills != null)
            {
                this.repLabel = new SleekLabel();
                this.repLabel.positionOffset_X = 83;
                this.repLabel.positionOffset_Y = 20;
                this.repLabel.sizeOffset_X     = -113;
                this.repLabel.sizeOffset_Y     = 30;
                this.repLabel.sizeScale_X      = 1f;
                this.repLabel.foregroundTint   = ESleekTint.NONE;
                this.repLabel.foregroundColor  = this.repImage.backgroundColor;
                this.repLabel.text             = PlayerTool.getRepTitle(this.player.player.skills.reputation);
                this.box.add(this.repLabel);
            }
            if (context == SleekPlayer.ESleekPlayerDisplayContext.GROUP_ROSTER)
            {
                this.nameLabel.positionOffset_Y = -5;
                this.repLabel.positionOffset_Y  = 10;
                SleekLabel sleekLabel = new SleekLabel();
                sleekLabel.positionOffset_X = 83;
                sleekLabel.positionOffset_Y = 25;
                sleekLabel.sizeOffset_X     = -113;
                sleekLabel.sizeOffset_Y     = 30;
                sleekLabel.sizeScale_X      = 1f;
                sleekLabel.foregroundTint   = ESleekTint.NONE;
                sleekLabel.foregroundColor  = this.repImage.backgroundColor;
                this.box.add(sleekLabel);
                EPlayerGroupRank groupRank = this.player.player.quests.groupRank;
                if (groupRank != EPlayerGroupRank.MEMBER)
                {
                    if (groupRank != EPlayerGroupRank.ADMIN)
                    {
                        if (groupRank == EPlayerGroupRank.OWNER)
                        {
                            sleekLabel.text = PlayerDashboardInformationUI.localization.format("Group_Rank_Owner");
                        }
                    }
                    else
                    {
                        sleekLabel.text = PlayerDashboardInformationUI.localization.format("Group_Rank_Admin");
                    }
                }
                else
                {
                    sleekLabel.text = PlayerDashboardInformationUI.localization.format("Group_Rank_Member");
                }
            }
            this.voice = new SleekImageTexture();
            this.voice.positionOffset_X = 15;
            this.voice.positionOffset_Y = 15;
            this.voice.sizeOffset_X     = 20;
            this.voice.sizeOffset_Y     = 20;
            this.voice.texture          = (Texture2D)PlayerDashboardInformationUI.icons.load("Voice");
            this.box.add(this.voice);
            this.skillset = new SleekImageTexture();
            this.skillset.positionOffset_X = -25;
            this.skillset.positionOffset_Y = 25;
            this.skillset.positionScale_X  = 1f;
            this.skillset.sizeOffset_X     = 20;
            this.skillset.sizeOffset_Y     = 20;
            this.skillset.texture          = (Texture2D)MenuSurvivorsCharacterUI.icons.load("Skillset_" + (int)this.player.skillset);
            this.skillset.backgroundTint   = ESleekTint.FOREGROUND;
            this.box.add(this.skillset);
            if (this.player.isAdmin && !Provider.isServer)
            {
                this.box.backgroundColor       = Palette.ADMIN;
                this.box.foregroundColor       = Palette.ADMIN;
                this.box.backgroundTint        = ESleekTint.NONE;
                this.box.foregroundTint        = ESleekTint.NONE;
                this.nameLabel.foregroundColor = Palette.ADMIN;
                this.nameLabel.foregroundTint  = ESleekTint.NONE;
                this.icon = new SleekImageTexture();
                this.icon.positionOffset_X = -25;
                this.icon.positionOffset_Y = 5;
                this.icon.positionScale_X  = 1f;
                this.icon.sizeOffset_X     = 20;
                this.icon.sizeOffset_Y     = 20;
                this.icon.texture          = (Texture2D)PlayerDashboardInformationUI.icons.load("Admin");
                this.box.add(this.icon);
            }
            else if (this.player.isPro)
            {
                this.box.backgroundColor       = Palette.PRO;
                this.box.foregroundColor       = Palette.PRO;
                this.box.backgroundTint        = ESleekTint.NONE;
                this.box.foregroundTint        = ESleekTint.NONE;
                this.nameLabel.foregroundColor = Palette.PRO;
                this.nameLabel.foregroundTint  = ESleekTint.NONE;
                this.icon = new SleekImageTexture();
                this.icon.positionOffset_X = -25;
                this.icon.positionOffset_Y = 5;
                this.icon.positionScale_X  = 1f;
                this.icon.sizeOffset_X     = 20;
                this.icon.sizeOffset_Y     = 20;
                this.icon.texture          = (Texture2D)PlayerDashboardInformationUI.icons.load("Pro");
                this.box.add(this.icon);
            }
            if (context == SleekPlayer.ESleekPlayerDisplayContext.GROUP_ROSTER)
            {
                int num = 0;
                if (!this.player.player.channel.isOwner)
                {
                    if (Player.player.quests.hasPermissionToChangeRank)
                    {
                        if (this.player.player.quests.groupRank < EPlayerGroupRank.OWNER)
                        {
                            SleekButton sleekButton2 = new SleekButton();
                            sleekButton2.positionOffset_X = num;
                            sleekButton2.positionScale_X  = 1f;
                            sleekButton2.sizeOffset_X     = 80;
                            sleekButton2.sizeScale_Y      = 1f;
                            sleekButton2.text             = PlayerDashboardInformationUI.localization.format("Group_Promote");
                            sleekButton2.tooltip          = PlayerDashboardInformationUI.localization.format("Group_Promote_Tooltip");
                            sleekButton2.onClickedButton  = new ClickedButton(this.onClickedPromoteButton);
                            this.box.add(sleekButton2);
                            num += 80;
                        }
                        if (this.player.player.quests.groupRank == EPlayerGroupRank.ADMIN)
                        {
                            SleekButton sleekButton3 = new SleekButton();
                            sleekButton3.positionOffset_X = num;
                            sleekButton3.positionScale_X  = 1f;
                            sleekButton3.sizeOffset_X     = 80;
                            sleekButton3.sizeScale_Y      = 1f;
                            sleekButton3.text             = PlayerDashboardInformationUI.localization.format("Group_Demote");
                            sleekButton3.tooltip          = PlayerDashboardInformationUI.localization.format("Group_Demote_Tooltip");
                            sleekButton3.onClickedButton  = new ClickedButton(this.onClickedDemoteButton);
                            this.box.add(sleekButton3);
                            num += 80;
                        }
                    }
                    if (Player.player.quests.hasPermissionToKickMembers && this.player.player.quests.canBeKickedFromGroup)
                    {
                        SleekButton sleekButton4 = new SleekButton();
                        sleekButton4.positionOffset_X = num;
                        sleekButton4.positionScale_X  = 1f;
                        sleekButton4.sizeOffset_X     = 50;
                        sleekButton4.sizeScale_Y      = 1f;
                        sleekButton4.text             = PlayerDashboardInformationUI.localization.format("Group_Kick");
                        sleekButton4.tooltip          = PlayerDashboardInformationUI.localization.format("Group_Kick_Tooltip");
                        sleekButton4.onClickedButton  = new ClickedButton(this.onClickedKickButton);
                        this.box.add(sleekButton4);
                        num += 50;
                    }
                }
                this.box.sizeOffset_X = -num;
            }
            else if (context == SleekPlayer.ESleekPlayerDisplayContext.PLAYER_LIST)
            {
                int num2 = 0;
                this.muteButton = new SleekButton();
                this.muteButton.positionScale_X = 1f;
                this.muteButton.sizeOffset_X    = 60;
                this.muteButton.sizeScale_Y     = 1f;
                this.muteButton.text            = ((!this.player.isMuted) ? PlayerDashboardInformationUI.localization.format("Mute_On") : PlayerDashboardInformationUI.localization.format("Mute_Off"));
                this.muteButton.tooltip         = PlayerDashboardInformationUI.localization.format("Mute_Tooltip");
                this.muteButton.onClickedButton = new ClickedButton(this.onClickedMuteButton);
                this.box.add(this.muteButton);
                num2 += 60;
                if (!this.player.player.channel.isOwner && !this.player.isAdmin)
                {
                    SleekButton sleekButton5 = new SleekButton();
                    sleekButton5.positionOffset_X = num2;
                    sleekButton5.positionScale_X  = 1f;
                    sleekButton5.sizeOffset_X     = 50;
                    sleekButton5.sizeScale_Y      = 1f;
                    sleekButton5.text             = PlayerDashboardInformationUI.localization.format("Vote_Kick");
                    sleekButton5.tooltip          = PlayerDashboardInformationUI.localization.format("Vote_Kick_Tooltip");
                    sleekButton5.onClickedButton  = new ClickedButton(this.onClickedKickButton);
                    this.box.add(sleekButton5);
                    num2 += 50;
                }
                if (Player.player != null)
                {
                    if (!this.player.player.channel.isOwner && Player.player.quests.isMemberOfAGroup && Player.player.quests.hasPermissionToInviteMembers && !this.player.player.quests.isMemberOfAGroup)
                    {
                        SleekButton sleekButton6 = new SleekButton();
                        sleekButton6.positionOffset_X = num2;
                        sleekButton6.positionScale_X  = 1f;
                        sleekButton6.sizeOffset_X     = 60;
                        sleekButton6.sizeScale_Y      = 1f;
                        sleekButton6.text             = PlayerDashboardInformationUI.localization.format("Group_Invite");
                        sleekButton6.tooltip          = PlayerDashboardInformationUI.localization.format("Group_Invite_Tooltip");
                        sleekButton6.onClickedButton  = new ClickedButton(this.onClickedInviteButton);
                        this.box.add(sleekButton6);
                        num2 += 60;
                    }
                    if (Player.player.channel.owner.isAdmin)
                    {
                        SleekButton sleekButton7 = new SleekButton();
                        sleekButton7.positionOffset_X = num2;
                        sleekButton7.positionScale_X  = 1f;
                        sleekButton7.sizeOffset_X     = 50;
                        sleekButton7.sizeScale_Y      = 1f;
                        sleekButton7.text             = PlayerDashboardInformationUI.localization.format("Spy");
                        sleekButton7.tooltip          = PlayerDashboardInformationUI.localization.format("Spy_Tooltip");
                        sleekButton7.onClickedButton  = new ClickedButton(this.onClickedSpyButton);
                        this.box.add(sleekButton7);
                        num2 += 50;
                    }
                }
                this.box.sizeOffset_X = -num2;
            }
            if (this.player != null)
            {
                PlayerVoice playerVoice = this.player.player.voice;
                playerVoice.onTalked = (Talked)Delegate.Combine(playerVoice.onTalked, new Talked(this.onTalked));
                this.onTalked(this.player.player.voice.isTalking);
            }
        }
        // Token: 0x0600349F RID: 13471 RVA: 0x00159C74 File Offset: 0x00158074
        public EditorEnvironmentLightingUI()
        {
            Local local = Localization.read("/Editor/EditorEnvironmentLighting.dat");

            EditorEnvironmentLightingUI.container = new Sleek();
            EditorEnvironmentLightingUI.container.positionOffset_X = 10;
            EditorEnvironmentLightingUI.container.positionOffset_Y = 10;
            EditorEnvironmentLightingUI.container.positionScale_X  = 1f;
            EditorEnvironmentLightingUI.container.sizeOffset_X     = -20;
            EditorEnvironmentLightingUI.container.sizeOffset_Y     = -20;
            EditorEnvironmentLightingUI.container.sizeScale_X      = 1f;
            EditorEnvironmentLightingUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorEnvironmentLightingUI.container);
            EditorEnvironmentLightingUI.active        = false;
            EditorEnvironmentLightingUI.selectedTime  = ELightingTime.DAWN;
            EditorEnvironmentLightingUI.azimuthSlider = new SleekSlider();
            EditorEnvironmentLightingUI.azimuthSlider.positionOffset_X = -230;
            EditorEnvironmentLightingUI.azimuthSlider.positionOffset_Y = 80;
            EditorEnvironmentLightingUI.azimuthSlider.positionScale_X  = 1f;
            EditorEnvironmentLightingUI.azimuthSlider.sizeOffset_X     = 230;
            EditorEnvironmentLightingUI.azimuthSlider.sizeOffset_Y     = 20;
            EditorEnvironmentLightingUI.azimuthSlider.state            = LevelLighting.azimuth / 360f;
            EditorEnvironmentLightingUI.azimuthSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentLightingUI.azimuthSlider.addLabel(local.format("AzimuthSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider = EditorEnvironmentLightingUI.azimuthSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cache0 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache0 = new Dragged(EditorEnvironmentLightingUI.onDraggedAzimuthSlider);
            }
            sleekSlider.onDragged = EditorEnvironmentLightingUI.< > f__mg$cache0;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.azimuthSlider);
            EditorEnvironmentLightingUI.biasSlider = new SleekSlider();
            EditorEnvironmentLightingUI.biasSlider.positionOffset_X = -230;
            EditorEnvironmentLightingUI.biasSlider.positionOffset_Y = 110;
            EditorEnvironmentLightingUI.biasSlider.positionScale_X  = 1f;
            EditorEnvironmentLightingUI.biasSlider.sizeOffset_X     = 230;
            EditorEnvironmentLightingUI.biasSlider.sizeOffset_Y     = 20;
            EditorEnvironmentLightingUI.biasSlider.state            = LevelLighting.bias;
            EditorEnvironmentLightingUI.biasSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentLightingUI.biasSlider.addLabel(local.format("BiasSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider2 = EditorEnvironmentLightingUI.biasSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cache1 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache1 = new Dragged(EditorEnvironmentLightingUI.onDraggedBiasSlider);
            }
            sleekSlider2.onDragged = EditorEnvironmentLightingUI.< > f__mg$cache1;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.biasSlider);
            EditorEnvironmentLightingUI.fadeSlider = new SleekSlider();
            EditorEnvironmentLightingUI.fadeSlider.positionOffset_X = -230;
            EditorEnvironmentLightingUI.fadeSlider.positionOffset_Y = 140;
            EditorEnvironmentLightingUI.fadeSlider.positionScale_X  = 1f;
            EditorEnvironmentLightingUI.fadeSlider.sizeOffset_X     = 230;
            EditorEnvironmentLightingUI.fadeSlider.sizeOffset_Y     = 20;
            EditorEnvironmentLightingUI.fadeSlider.state            = LevelLighting.fade;
            EditorEnvironmentLightingUI.fadeSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentLightingUI.fadeSlider.addLabel(local.format("FadeSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider3 = EditorEnvironmentLightingUI.fadeSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cache2 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache2 = new Dragged(EditorEnvironmentLightingUI.onDraggedFadeSlider);
            }
            sleekSlider3.onDragged = EditorEnvironmentLightingUI.< > f__mg$cache2;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.fadeSlider);
            EditorEnvironmentLightingUI.lightingScrollBox = new SleekScrollBox();
            EditorEnvironmentLightingUI.lightingScrollBox.positionOffset_X = -470;
            EditorEnvironmentLightingUI.lightingScrollBox.positionOffset_Y = 170;
            EditorEnvironmentLightingUI.lightingScrollBox.positionScale_X  = 1f;
            EditorEnvironmentLightingUI.lightingScrollBox.sizeOffset_X     = 470;
            EditorEnvironmentLightingUI.lightingScrollBox.sizeOffset_Y     = -170;
            EditorEnvironmentLightingUI.lightingScrollBox.sizeScale_Y      = 1f;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.lightingScrollBox);
            EditorEnvironmentLightingUI.seaLevelSlider = new SleekValue();
            EditorEnvironmentLightingUI.seaLevelSlider.positionOffset_Y = -130;
            EditorEnvironmentLightingUI.seaLevelSlider.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.seaLevelSlider.sizeOffset_X     = 200;
            EditorEnvironmentLightingUI.seaLevelSlider.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.seaLevelSlider.state            = LevelLighting.seaLevel;
            EditorEnvironmentLightingUI.seaLevelSlider.addLabel(local.format("Sea_Level_Slider_Label"), ESleekSide.RIGHT);
            SleekValue sleekValue = EditorEnvironmentLightingUI.seaLevelSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cache3 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache3 = new Valued(EditorEnvironmentLightingUI.onValuedSeaLevelSlider);
            }
            sleekValue.onValued = EditorEnvironmentLightingUI.< > f__mg$cache3;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.seaLevelSlider);
            EditorEnvironmentLightingUI.snowLevelSlider = new SleekValue();
            EditorEnvironmentLightingUI.snowLevelSlider.positionOffset_Y = -90;
            EditorEnvironmentLightingUI.snowLevelSlider.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.snowLevelSlider.sizeOffset_X     = 200;
            EditorEnvironmentLightingUI.snowLevelSlider.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.snowLevelSlider.state            = LevelLighting.snowLevel;
            EditorEnvironmentLightingUI.snowLevelSlider.addLabel(local.format("Snow_Level_Slider_Label"), ESleekSide.RIGHT);
            SleekValue sleekValue2 = EditorEnvironmentLightingUI.snowLevelSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cache4 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache4 = new Valued(EditorEnvironmentLightingUI.onValuedSnowLevelSlider);
            }
            sleekValue2.onValued = EditorEnvironmentLightingUI.< > f__mg$cache4;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.snowLevelSlider);
            EditorEnvironmentLightingUI.rainFreqField = new SleekSingleField();
            EditorEnvironmentLightingUI.rainFreqField.positionOffset_Y = -370;
            EditorEnvironmentLightingUI.rainFreqField.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.rainFreqField.sizeOffset_X     = 100;
            EditorEnvironmentLightingUI.rainFreqField.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.rainFreqField.state            = LevelLighting.rainFreq;
            EditorEnvironmentLightingUI.rainFreqField.addLabel(local.format("Rain_Freq_Label"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField = EditorEnvironmentLightingUI.rainFreqField;

            if (EditorEnvironmentLightingUI.< > f__mg$cache5 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache5 = new TypedSingle(EditorEnvironmentLightingUI.onTypedRainFreqField);
            }
            sleekSingleField.onTypedSingle = EditorEnvironmentLightingUI.< > f__mg$cache5;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.rainFreqField);
            EditorEnvironmentLightingUI.rainDurField = new SleekSingleField();
            EditorEnvironmentLightingUI.rainDurField.positionOffset_Y = -330;
            EditorEnvironmentLightingUI.rainDurField.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.rainDurField.sizeOffset_X     = 100;
            EditorEnvironmentLightingUI.rainDurField.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.rainDurField.state            = LevelLighting.rainDur;
            EditorEnvironmentLightingUI.rainDurField.addLabel(local.format("Rain_Dur_Label"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField2 = EditorEnvironmentLightingUI.rainDurField;

            if (EditorEnvironmentLightingUI.< > f__mg$cache6 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache6 = new TypedSingle(EditorEnvironmentLightingUI.onTypedRainDurField);
            }
            sleekSingleField2.onTypedSingle = EditorEnvironmentLightingUI.< > f__mg$cache6;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.rainDurField);
            EditorEnvironmentLightingUI.snowFreqField = new SleekSingleField();
            EditorEnvironmentLightingUI.snowFreqField.positionOffset_Y = -290;
            EditorEnvironmentLightingUI.snowFreqField.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.snowFreqField.sizeOffset_X     = 100;
            EditorEnvironmentLightingUI.snowFreqField.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.snowFreqField.state            = LevelLighting.snowFreq;
            EditorEnvironmentLightingUI.snowFreqField.addLabel(local.format("Snow_Freq_Label"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField3 = EditorEnvironmentLightingUI.snowFreqField;

            if (EditorEnvironmentLightingUI.< > f__mg$cache7 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache7 = new TypedSingle(EditorEnvironmentLightingUI.onTypedSnowFreqField);
            }
            sleekSingleField3.onTypedSingle = EditorEnvironmentLightingUI.< > f__mg$cache7;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.snowFreqField);
            EditorEnvironmentLightingUI.snowDurField = new SleekSingleField();
            EditorEnvironmentLightingUI.snowDurField.positionOffset_Y = -250;
            EditorEnvironmentLightingUI.snowDurField.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.snowDurField.sizeOffset_X     = 100;
            EditorEnvironmentLightingUI.snowDurField.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.snowDurField.state            = LevelLighting.snowDur;
            EditorEnvironmentLightingUI.snowDurField.addLabel(local.format("Snow_Dur_Label"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField4 = EditorEnvironmentLightingUI.snowDurField;

            if (EditorEnvironmentLightingUI.< > f__mg$cache8 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache8 = new TypedSingle(EditorEnvironmentLightingUI.onTypedSnowDurField);
            }
            sleekSingleField4.onTypedSingle = EditorEnvironmentLightingUI.< > f__mg$cache8;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.snowDurField);
            EditorEnvironmentLightingUI.stormButton = new SleekButton();
            EditorEnvironmentLightingUI.stormButton.positionOffset_Y = -210;
            EditorEnvironmentLightingUI.stormButton.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.stormButton.sizeOffset_X     = 100;
            EditorEnvironmentLightingUI.stormButton.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.stormButton.text             = local.format("Storm");
            EditorEnvironmentLightingUI.stormButton.tooltip          = local.format("Storm_Tooltip");
            SleekButton sleekButton = EditorEnvironmentLightingUI.stormButton;

            if (EditorEnvironmentLightingUI.< > f__mg$cache9 == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cache9 = new ClickedButton(EditorEnvironmentLightingUI.onClickedStormButton);
            }
            sleekButton.onClickedButton = EditorEnvironmentLightingUI.< > f__mg$cache9;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.stormButton);
            EditorEnvironmentLightingUI.rainToggle = new SleekToggle();
            EditorEnvironmentLightingUI.rainToggle.positionOffset_X = 110;
            EditorEnvironmentLightingUI.rainToggle.positionOffset_Y = -215;
            EditorEnvironmentLightingUI.rainToggle.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.rainToggle.sizeOffset_X     = 40;
            EditorEnvironmentLightingUI.rainToggle.sizeOffset_Y     = 40;
            EditorEnvironmentLightingUI.rainToggle.state            = LevelLighting.canRain;
            EditorEnvironmentLightingUI.rainToggle.addLabel(local.format("Rain_Toggle_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = EditorEnvironmentLightingUI.rainToggle;

            if (EditorEnvironmentLightingUI.< > f__mg$cacheA == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cacheA = new Toggled(EditorEnvironmentLightingUI.onToggledRainToggle);
            }
            sleekToggle.onToggled = EditorEnvironmentLightingUI.< > f__mg$cacheA;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.rainToggle);
            EditorEnvironmentLightingUI.blizzardButton = new SleekButton();
            EditorEnvironmentLightingUI.blizzardButton.positionOffset_Y = -170;
            EditorEnvironmentLightingUI.blizzardButton.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.blizzardButton.sizeOffset_X     = 100;
            EditorEnvironmentLightingUI.blizzardButton.sizeOffset_Y     = 30;
            EditorEnvironmentLightingUI.blizzardButton.text             = local.format("Blizzard");
            EditorEnvironmentLightingUI.blizzardButton.tooltip          = local.format("Blizzard_Tooltip");
            SleekButton sleekButton2 = EditorEnvironmentLightingUI.blizzardButton;

            if (EditorEnvironmentLightingUI.< > f__mg$cacheB == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cacheB = new ClickedButton(EditorEnvironmentLightingUI.onClickedBlizzardButton);
            }
            sleekButton2.onClickedButton = EditorEnvironmentLightingUI.< > f__mg$cacheB;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.blizzardButton);
            EditorEnvironmentLightingUI.snowToggle = new SleekToggle();
            EditorEnvironmentLightingUI.snowToggle.positionOffset_X = 110;
            EditorEnvironmentLightingUI.snowToggle.positionOffset_Y = -175;
            EditorEnvironmentLightingUI.snowToggle.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.snowToggle.sizeOffset_X     = 40;
            EditorEnvironmentLightingUI.snowToggle.sizeOffset_Y     = 40;
            EditorEnvironmentLightingUI.snowToggle.state            = LevelLighting.canSnow;
            EditorEnvironmentLightingUI.snowToggle.addLabel(local.format("Snow_Toggle_Label"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = EditorEnvironmentLightingUI.snowToggle;

            if (EditorEnvironmentLightingUI.< > f__mg$cacheC == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cacheC = new Toggled(EditorEnvironmentLightingUI.onToggledSnowToggle);
            }
            sleekToggle2.onToggled = EditorEnvironmentLightingUI.< > f__mg$cacheC;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.snowToggle);
            EditorEnvironmentLightingUI.moonSlider = new SleekSlider();
            EditorEnvironmentLightingUI.moonSlider.positionOffset_Y = -50;
            EditorEnvironmentLightingUI.moonSlider.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.moonSlider.sizeOffset_X     = 200;
            EditorEnvironmentLightingUI.moonSlider.sizeOffset_Y     = 20;
            EditorEnvironmentLightingUI.moonSlider.state            = (float)LevelLighting.moon / (float)LevelLighting.MOON_CYCLES;
            EditorEnvironmentLightingUI.moonSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentLightingUI.moonSlider.addLabel(local.format("MoonSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider4 = EditorEnvironmentLightingUI.moonSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cacheD == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cacheD = new Dragged(EditorEnvironmentLightingUI.onDraggedMoonSlider);
            }
            sleekSlider4.onDragged = EditorEnvironmentLightingUI.< > f__mg$cacheD;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.moonSlider);
            EditorEnvironmentLightingUI.timeSlider = new SleekSlider();
            EditorEnvironmentLightingUI.timeSlider.positionOffset_Y = -20;
            EditorEnvironmentLightingUI.timeSlider.positionScale_Y  = 1f;
            EditorEnvironmentLightingUI.timeSlider.sizeOffset_X     = 200;
            EditorEnvironmentLightingUI.timeSlider.sizeOffset_Y     = 20;
            EditorEnvironmentLightingUI.timeSlider.state            = LevelLighting.time;
            EditorEnvironmentLightingUI.timeSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentLightingUI.timeSlider.addLabel(local.format("TimeSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider5 = EditorEnvironmentLightingUI.timeSlider;

            if (EditorEnvironmentLightingUI.< > f__mg$cacheE == null)
            {
                EditorEnvironmentLightingUI.< > f__mg$cacheE = new Dragged(EditorEnvironmentLightingUI.onDraggedTimeSlider);
            }
            sleekSlider5.onDragged = EditorEnvironmentLightingUI.< > f__mg$cacheE;
            EditorEnvironmentLightingUI.container.add(EditorEnvironmentLightingUI.timeSlider);
            EditorEnvironmentLightingUI.timeButtons = new SleekButton[4];
            for (int i = 0; i < EditorEnvironmentLightingUI.timeButtons.Length; i++)
            {
                SleekButton sleekButton3 = new SleekButton();
                sleekButton3.positionOffset_X = 240;
                sleekButton3.positionOffset_Y = i * 40;
                sleekButton3.sizeOffset_X     = 200;
                sleekButton3.sizeOffset_Y     = 30;
                sleekButton3.text             = local.format("Time_" + i);
                SleekButton sleekButton4    = sleekButton3;
                Delegate    onClickedButton = sleekButton4.onClickedButton;
                if (EditorEnvironmentLightingUI.< > f__mg$cacheF == null)
                {
                    EditorEnvironmentLightingUI.< > f__mg$cacheF = new ClickedButton(EditorEnvironmentLightingUI.onClickedTimeButton);
                }
                sleekButton4.onClickedButton = (ClickedButton)Delegate.Combine(onClickedButton, EditorEnvironmentLightingUI.< > f__mg$cacheF);
                EditorEnvironmentLightingUI.lightingScrollBox.add(sleekButton3);
                EditorEnvironmentLightingUI.timeButtons[i] = sleekButton3;
            }
            EditorEnvironmentLightingUI.infoBoxes     = new SleekBox[12];
            EditorEnvironmentLightingUI.colorPickers  = new SleekColorPicker[EditorEnvironmentLightingUI.infoBoxes.Length];
            EditorEnvironmentLightingUI.singleSliders = new SleekSlider[5];
            for (int j = 0; j < EditorEnvironmentLightingUI.colorPickers.Length; j++)
            {
                SleekBox sleekBox = new SleekBox();
                sleekBox.positionOffset_X = 240;
                sleekBox.positionOffset_Y = EditorEnvironmentLightingUI.timeButtons.Length * 40 + j * 170;
                sleekBox.sizeOffset_X     = 200;
                sleekBox.sizeOffset_Y     = 30;
                sleekBox.text             = local.format("Color_" + j);
                EditorEnvironmentLightingUI.lightingScrollBox.add(sleekBox);
                EditorEnvironmentLightingUI.infoBoxes[j] = sleekBox;
                SleekColorPicker sleekColorPicker = new SleekColorPicker();
                sleekColorPicker.positionOffset_X = 200;
                sleekColorPicker.positionOffset_Y = EditorEnvironmentLightingUI.timeButtons.Length * 40 + j * 170 + 40;
                SleekColorPicker sleekColorPicker2 = sleekColorPicker;
                Delegate         onColorPicked     = sleekColorPicker2.onColorPicked;
                if (EditorEnvironmentLightingUI.< > f__mg$cache10 == null)
                {
                    EditorEnvironmentLightingUI.< > f__mg$cache10 = new ColorPicked(EditorEnvironmentLightingUI.onPickedColorPicker);
                }
                sleekColorPicker2.onColorPicked = (ColorPicked)Delegate.Combine(onColorPicked, EditorEnvironmentLightingUI.< > f__mg$cache10);
                EditorEnvironmentLightingUI.lightingScrollBox.add(sleekColorPicker);
                EditorEnvironmentLightingUI.colorPickers[j] = sleekColorPicker;
            }
            for (int k = 0; k < EditorEnvironmentLightingUI.singleSliders.Length; k++)
            {
                SleekSlider sleekSlider6 = new SleekSlider();
                sleekSlider6.positionOffset_X = 240;
                sleekSlider6.positionOffset_Y = EditorEnvironmentLightingUI.timeButtons.Length * 40 + EditorEnvironmentLightingUI.colorPickers.Length * 170 + k * 30;
                sleekSlider6.sizeOffset_X     = 200;
                sleekSlider6.sizeOffset_Y     = 20;
                sleekSlider6.orientation      = ESleekOrientation.HORIZONTAL;
                sleekSlider6.addLabel(local.format("Single_" + k), ESleekSide.LEFT);
                SleekSlider sleekSlider7 = sleekSlider6;
                Delegate    onDragged    = sleekSlider7.onDragged;
                if (EditorEnvironmentLightingUI.< > f__mg$cache11 == null)
                {
                    EditorEnvironmentLightingUI.< > f__mg$cache11 = new Dragged(EditorEnvironmentLightingUI.onDraggedSingleSlider);
                }
                sleekSlider7.onDragged = (Dragged)Delegate.Combine(onDragged, EditorEnvironmentLightingUI.< > f__mg$cache11);
                EditorEnvironmentLightingUI.lightingScrollBox.add(sleekSlider6);
                EditorEnvironmentLightingUI.singleSliders[k] = sleekSlider6;
            }
            EditorEnvironmentLightingUI.lightingScrollBox.area = new Rect(0f, 0f, 5f, (float)(EditorEnvironmentLightingUI.timeButtons.Length * 40 + EditorEnvironmentLightingUI.colorPickers.Length * 170 + EditorEnvironmentLightingUI.singleSliders.Length * 30 - 10));
            EditorEnvironmentLightingUI.updateSelection();
        }