Example #1
0
        public PlayerDeathUI()
        {
            PlayerDeathUI.localization = Localization.read("/Player/PlayerDeath.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerDeath/PlayerDeath.unity3d");

            PlayerDeathUI.container = new Sleek();
            PlayerDeathUI.container.positionScale_Y  = 1f;
            PlayerDeathUI.container.positionOffset_X = 10;
            PlayerDeathUI.container.positionOffset_Y = 10;
            PlayerDeathUI.container.sizeOffset_X     = -20;
            PlayerDeathUI.container.sizeOffset_Y     = -20;
            PlayerDeathUI.container.sizeScale_X      = 1f;
            PlayerDeathUI.container.sizeScale_Y      = 1f;
            PlayerUI.container.add(PlayerDeathUI.container);
            PlayerDeathUI.active   = false;
            PlayerDeathUI.causeBox = new SleekBox();
            PlayerDeathUI.causeBox.positionOffset_Y = -25;
            PlayerDeathUI.causeBox.positionScale_Y  = 0.8f;
            PlayerDeathUI.causeBox.sizeOffset_Y     = 50;
            PlayerDeathUI.causeBox.sizeScale_X      = 1f;
            PlayerDeathUI.container.add(PlayerDeathUI.causeBox);
            PlayerDeathUI.homeButton = new SleekButtonIcon((Texture2D)bundle.load("Home"));
            PlayerDeathUI.homeButton.positionOffset_X         = -205;
            PlayerDeathUI.homeButton.positionOffset_Y         = 35;
            PlayerDeathUI.homeButton.positionScale_X          = 0.5f;
            PlayerDeathUI.homeButton.positionScale_Y          = 0.8f;
            PlayerDeathUI.homeButton.sizeOffset_X             = 200;
            PlayerDeathUI.homeButton.sizeOffset_Y             = 30;
            PlayerDeathUI.homeButton.text                     = PlayerDeathUI.localization.format("Home_Button");
            PlayerDeathUI.homeButton.tooltip                  = PlayerDeathUI.localization.format("Home_Button_Tooltip");
            PlayerDeathUI.homeButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton = PlayerDeathUI.homeButton;

            if (PlayerDeathUI.< > f__mg$cache0 == null)
            {
                PlayerDeathUI.< > f__mg$cache0 = new ClickedButton(PlayerDeathUI.onClickedHomeButton);
            }
            sleekButton.onClickedButton = PlayerDeathUI.< > f__mg$cache0;
            PlayerDeathUI.container.add(PlayerDeathUI.homeButton);
            PlayerDeathUI.respawnButton = new SleekButtonIcon((Texture2D)bundle.load("Respawn"));
            PlayerDeathUI.respawnButton.positionOffset_X         = 5;
            PlayerDeathUI.respawnButton.positionOffset_Y         = 35;
            PlayerDeathUI.respawnButton.positionScale_X          = 0.5f;
            PlayerDeathUI.respawnButton.positionScale_Y          = 0.8f;
            PlayerDeathUI.respawnButton.sizeOffset_X             = 200;
            PlayerDeathUI.respawnButton.sizeOffset_Y             = 30;
            PlayerDeathUI.respawnButton.text                     = PlayerDeathUI.localization.format("Respawn_Button");
            PlayerDeathUI.respawnButton.tooltip                  = PlayerDeathUI.localization.format("Respawn_Button_Tooltip");
            PlayerDeathUI.respawnButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton2 = PlayerDeathUI.respawnButton;

            if (PlayerDeathUI.< > f__mg$cache1 == null)
            {
                PlayerDeathUI.< > f__mg$cache1 = new ClickedButton(PlayerDeathUI.onClickedRespawnButton);
            }
            sleekButton2.onClickedButton = PlayerDeathUI.< > f__mg$cache1;
            PlayerDeathUI.container.add(PlayerDeathUI.respawnButton);
            bundle.unload();
        }
 // Token: 0x0600324D RID: 12877 RVA: 0x0014728C File Offset: 0x0014568C
 public SleekCharacter(byte newIndex)
 {
     base.init();
     this.index                  = newIndex;
     this.button                 = new SleekButton();
     this.button.sizeScale_X     = 1f;
     this.button.sizeScale_Y     = 1f;
     this.button.onClickedButton = new ClickedButton(this.onClickedButton);
     base.add(this.button);
     this.nameLabel             = new SleekLabel();
     this.nameLabel.sizeScale_X = 1f;
     this.nameLabel.sizeScale_Y = 0.33f;
     this.button.add(this.nameLabel);
     this.nickLabel = new SleekLabel();
     this.nickLabel.positionScale_Y = 0.33f;
     this.nickLabel.sizeScale_X     = 1f;
     this.nickLabel.sizeScale_Y     = 0.33f;
     this.button.add(this.nickLabel);
     this.skillsetLabel = new SleekLabel();
     this.skillsetLabel.positionScale_Y = 0.66f;
     this.skillsetLabel.sizeScale_X     = 1f;
     this.skillsetLabel.sizeScale_Y     = 0.33f;
     this.button.add(this.skillsetLabel);
     if (!Provider.isPro && this.index >= Customization.FREE_CHARACTERS)
     {
         Bundle            bundle            = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Pro/Pro.unity3d");
         SleekImageTexture sleekImageTexture = new SleekImageTexture();
         sleekImageTexture.positionOffset_X = -20;
         sleekImageTexture.positionOffset_Y = -20;
         sleekImageTexture.positionScale_X  = 0.5f;
         sleekImageTexture.positionScale_Y  = 0.5f;
         sleekImageTexture.sizeOffset_X     = 40;
         sleekImageTexture.sizeOffset_Y     = 40;
         sleekImageTexture.texture          = (Texture2D)bundle.load("Lock_Medium");
         this.button.add(sleekImageTexture);
         bundle.unload();
     }
 }
Example #3
0
        public MenuSurvivorsClothingUI()
        {
            MenuSurvivorsClothingUI.localization = Localization.read("/Menu/Survivors/MenuSurvivorsClothing.dat");
            if (MenuSurvivorsClothingUI.icons != null)
            {
                MenuSurvivorsClothingUI.icons.unload();
                MenuSurvivorsClothingUI.icons = null;
            }
            MenuSurvivorsClothingUI.icons     = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Survivors/MenuSurvivorsClothing/MenuSurvivorsClothing.unity3d");
            MenuSurvivorsClothingUI.container = new Sleek();
            MenuSurvivorsClothingUI.container.positionOffset_X = 10;
            MenuSurvivorsClothingUI.container.positionOffset_Y = 10;
            MenuSurvivorsClothingUI.container.positionScale_Y  = 1f;
            MenuSurvivorsClothingUI.container.sizeOffset_X     = -20;
            MenuSurvivorsClothingUI.container.sizeOffset_Y     = -20;
            MenuSurvivorsClothingUI.container.sizeScale_X      = 1f;
            MenuSurvivorsClothingUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuSurvivorsClothingUI.container);
            MenuSurvivorsClothingUI.active    = false;
            MenuSurvivorsClothingUI.page      = 0;
            MenuSurvivorsClothingUI.inventory = new Sleek();
            MenuSurvivorsClothingUI.inventory.positionOffset_Y = 40;
            MenuSurvivorsClothingUI.inventory.positionScale_X  = 0.5f;
            MenuSurvivorsClothingUI.inventory.sizeScale_X      = 0.5f;
            MenuSurvivorsClothingUI.inventory.sizeScale_Y      = 1f;
            MenuSurvivorsClothingUI.inventory.sizeOffset_Y     = -80;
            MenuSurvivorsClothingUI.inventory.constraint       = ESleekConstraint.XY;
            MenuSurvivorsClothingUI.container.add(MenuSurvivorsClothingUI.inventory);
            MenuSurvivorsClothingUI.packageButtons = new SleekInventory[25];
            for (int i = 0; i < MenuSurvivorsClothingUI.packageButtons.Length; i++)
            {
                SleekInventory sleekInventory = new SleekInventory();
                sleekInventory.positionOffset_X = 5;
                sleekInventory.positionOffset_Y = 5;
                sleekInventory.positionScale_X  = (float)(i % 5) * 0.2f;
                sleekInventory.positionScale_Y  = (float)Mathf.FloorToInt((float)i / 5f) * 0.2f;
                sleekInventory.sizeOffset_X     = -10;
                sleekInventory.sizeOffset_Y     = -10;
                sleekInventory.sizeScale_X      = 0.2f;
                sleekInventory.sizeScale_Y      = 0.2f;
                SleekInventory sleekInventory2 = sleekInventory;
                if (MenuSurvivorsClothingUI.< > f__mg$cache0 == null)
                {
                    MenuSurvivorsClothingUI.< > f__mg$cache0 = new ClickedInventory(MenuSurvivorsClothingUI.onClickedInventory);
                }
                sleekInventory2.onClickedInventory = MenuSurvivorsClothingUI.< > f__mg$cache0;
                MenuSurvivorsClothingUI.inventory.add(sleekInventory);
                MenuSurvivorsClothingUI.packageButtons[i] = sleekInventory;
            }
            MenuSurvivorsClothingUI.searchField = new SleekField();
            MenuSurvivorsClothingUI.searchField.positionOffset_X = 5;
            MenuSurvivorsClothingUI.searchField.positionOffset_Y = -35;
            MenuSurvivorsClothingUI.searchField.sizeOffset_X     = -120;
            MenuSurvivorsClothingUI.searchField.sizeOffset_Y     = 30;
            MenuSurvivorsClothingUI.searchField.sizeScale_X      = 1f;
            MenuSurvivorsClothingUI.searchField.hint             = MenuSurvivorsClothingUI.localization.format("Search_Field_Hint");
            MenuSurvivorsClothingUI.searchField.control          = "Search";
            SleekField sleekField = MenuSurvivorsClothingUI.searchField;
            Delegate   onEntered  = sleekField.onEntered;

            if (MenuSurvivorsClothingUI.< > f__mg$cache1 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache1 = new Entered(MenuSurvivorsClothingUI.onEnteredSearchField);
            }
            sleekField.onEntered = (Entered)Delegate.Combine(onEntered, MenuSurvivorsClothingUI.< > f__mg$cache1);
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.searchField);
            MenuSurvivorsClothingUI.searchButton = new SleekButton();
            MenuSurvivorsClothingUI.searchButton.positionOffset_X = -105;
            MenuSurvivorsClothingUI.searchButton.positionOffset_Y = -35;
            MenuSurvivorsClothingUI.searchButton.positionScale_X  = 1f;
            MenuSurvivorsClothingUI.searchButton.sizeOffset_X     = 100;
            MenuSurvivorsClothingUI.searchButton.sizeOffset_Y     = 30;
            MenuSurvivorsClothingUI.searchButton.text             = MenuSurvivorsClothingUI.localization.format("Search");
            MenuSurvivorsClothingUI.searchButton.tooltip          = MenuSurvivorsClothingUI.localization.format("Search_Tooltip");
            SleekButton sleekButton = MenuSurvivorsClothingUI.searchButton;

            if (MenuSurvivorsClothingUI.< > f__mg$cache2 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache2 = new ClickedButton(MenuSurvivorsClothingUI.onClickedSearchButton);
            }
            sleekButton.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache2;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.searchButton);
            MenuSurvivorsClothingUI.pageBox = new SleekBox();
            MenuSurvivorsClothingUI.pageBox.positionOffset_X = -145;
            MenuSurvivorsClothingUI.pageBox.positionOffset_Y = 5;
            MenuSurvivorsClothingUI.pageBox.positionScale_X  = 1f;
            MenuSurvivorsClothingUI.pageBox.positionScale_Y  = 1f;
            MenuSurvivorsClothingUI.pageBox.sizeOffset_X     = 100;
            MenuSurvivorsClothingUI.pageBox.sizeOffset_Y     = 30;
            MenuSurvivorsClothingUI.pageBox.fontSize         = 14;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.pageBox);
            MenuSurvivorsClothingUI.infoBox = new SleekBox();
            MenuSurvivorsClothingUI.infoBox.positionOffset_X = 5;
            MenuSurvivorsClothingUI.infoBox.positionOffset_Y = -25;
            MenuSurvivorsClothingUI.infoBox.positionScale_Y  = 0.5f;
            MenuSurvivorsClothingUI.infoBox.sizeScale_X      = 1f;
            MenuSurvivorsClothingUI.infoBox.sizeOffset_X     = -10;
            MenuSurvivorsClothingUI.infoBox.sizeOffset_Y     = 50;
            MenuSurvivorsClothingUI.infoBox.text             = MenuSurvivorsClothingUI.localization.format("No_Items");
            MenuSurvivorsClothingUI.infoBox.fontSize         = 14;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.infoBox);
            MenuSurvivorsClothingUI.infoBox.isVisible                   = !Provider.provider.economyService.isInventoryAvailable;
            MenuSurvivorsClothingUI.leftButton                          = new SleekButtonIcon((Texture2D)MenuSurvivorsClothingUI.icons.load("Left"));
            MenuSurvivorsClothingUI.leftButton.positionOffset_X         = -185;
            MenuSurvivorsClothingUI.leftButton.positionOffset_Y         = 5;
            MenuSurvivorsClothingUI.leftButton.positionScale_X          = 1f;
            MenuSurvivorsClothingUI.leftButton.positionScale_Y          = 1f;
            MenuSurvivorsClothingUI.leftButton.sizeOffset_X             = 30;
            MenuSurvivorsClothingUI.leftButton.sizeOffset_Y             = 30;
            MenuSurvivorsClothingUI.leftButton.tooltip                  = MenuSurvivorsClothingUI.localization.format("Left_Tooltip");
            MenuSurvivorsClothingUI.leftButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton2 = MenuSurvivorsClothingUI.leftButton;

            if (MenuSurvivorsClothingUI.< > f__mg$cache3 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache3 = new ClickedButton(MenuSurvivorsClothingUI.onClickedLeftButton);
            }
            sleekButton2.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache3;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.leftButton);
            MenuSurvivorsClothingUI.rightButton = new SleekButtonIcon((Texture2D)MenuSurvivorsClothingUI.icons.load("Right"));
            MenuSurvivorsClothingUI.rightButton.positionOffset_X         = -35;
            MenuSurvivorsClothingUI.rightButton.positionOffset_Y         = 5;
            MenuSurvivorsClothingUI.rightButton.positionScale_X          = 1f;
            MenuSurvivorsClothingUI.rightButton.positionScale_Y          = 1f;
            MenuSurvivorsClothingUI.rightButton.sizeOffset_X             = 30;
            MenuSurvivorsClothingUI.rightButton.sizeOffset_Y             = 30;
            MenuSurvivorsClothingUI.rightButton.tooltip                  = MenuSurvivorsClothingUI.localization.format("Right_Tooltip");
            MenuSurvivorsClothingUI.rightButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton3 = MenuSurvivorsClothingUI.rightButton;

            if (MenuSurvivorsClothingUI.< > f__mg$cache4 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache4 = new ClickedButton(MenuSurvivorsClothingUI.onClickedRightButton);
            }
            sleekButton3.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache4;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.rightButton);
            MenuSurvivorsClothingUI.refreshButton = new SleekButtonIcon((Texture2D)MenuSurvivorsClothingUI.icons.load("Refresh"));
            MenuSurvivorsClothingUI.refreshButton.positionOffset_X         = 5;
            MenuSurvivorsClothingUI.refreshButton.positionOffset_Y         = 5;
            MenuSurvivorsClothingUI.refreshButton.positionScale_Y          = 1f;
            MenuSurvivorsClothingUI.refreshButton.sizeOffset_X             = 30;
            MenuSurvivorsClothingUI.refreshButton.sizeOffset_Y             = 30;
            MenuSurvivorsClothingUI.refreshButton.tooltip                  = MenuSurvivorsClothingUI.localization.format("Refresh_Tooltip");
            MenuSurvivorsClothingUI.refreshButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton4 = MenuSurvivorsClothingUI.refreshButton;

            if (MenuSurvivorsClothingUI.< > f__mg$cache5 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache5 = new ClickedButton(MenuSurvivorsClothingUI.onClickedRefreshButton);
            }
            sleekButton4.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache5;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.refreshButton);
            MenuSurvivorsClothingUI.characterSlider = new SleekSlider();
            MenuSurvivorsClothingUI.characterSlider.positionOffset_X = 45;
            MenuSurvivorsClothingUI.characterSlider.positionOffset_Y = 10;
            MenuSurvivorsClothingUI.characterSlider.positionScale_Y  = 1f;
            MenuSurvivorsClothingUI.characterSlider.sizeOffset_X     = -240;
            MenuSurvivorsClothingUI.characterSlider.sizeOffset_Y     = 20;
            MenuSurvivorsClothingUI.characterSlider.sizeScale_X      = 1f;
            MenuSurvivorsClothingUI.characterSlider.orientation      = ESleekOrientation.HORIZONTAL;
            SleekSlider sleekSlider = MenuSurvivorsClothingUI.characterSlider;

            if (MenuSurvivorsClothingUI.< > f__mg$cache6 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache6 = new Dragged(MenuSurvivorsClothingUI.onDraggedCharacterSlider);
            }
            sleekSlider.onDragged = MenuSurvivorsClothingUI.< > f__mg$cache6;
            MenuSurvivorsClothingUI.inventory.add(MenuSurvivorsClothingUI.characterSlider);
            MenuSurvivorsClothingUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuSurvivorsClothingUI.backButton.positionOffset_Y = -50;
            MenuSurvivorsClothingUI.backButton.positionScale_Y  = 1f;
            MenuSurvivorsClothingUI.backButton.sizeOffset_X     = 200;
            MenuSurvivorsClothingUI.backButton.sizeOffset_Y     = 50;
            MenuSurvivorsClothingUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuSurvivorsClothingUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton5 = MenuSurvivorsClothingUI.backButton;

            if (MenuSurvivorsClothingUI.< > f__mg$cache7 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache7 = new ClickedButton(MenuSurvivorsClothingUI.onClickedBackButton);
            }
            sleekButton5.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache7;
            MenuSurvivorsClothingUI.backButton.fontSize = 14;
            MenuSurvivorsClothingUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuSurvivorsClothingUI.container.add(MenuSurvivorsClothingUI.backButton);
            MenuSurvivorsClothingUI.itemstoreButton = new SleekButton();
            MenuSurvivorsClothingUI.itemstoreButton.positionOffset_Y = -110;
            MenuSurvivorsClothingUI.itemstoreButton.positionScale_Y  = 1f;
            MenuSurvivorsClothingUI.itemstoreButton.sizeOffset_X     = 200;
            MenuSurvivorsClothingUI.itemstoreButton.sizeOffset_Y     = 50;
            MenuSurvivorsClothingUI.itemstoreButton.text             = MenuSurvivorsClothingUI.localization.format("Itemstore");
            MenuSurvivorsClothingUI.itemstoreButton.tooltip          = MenuSurvivorsClothingUI.localization.format("Itemstore_Tooltip");
            SleekButton sleekButton6 = MenuSurvivorsClothingUI.itemstoreButton;

            if (MenuSurvivorsClothingUI.< > f__mg$cache8 == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cache8 = new ClickedButton(MenuSurvivorsClothingUI.onClickedItemstoreButton);
            }
            sleekButton6.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache8;
            MenuSurvivorsClothingUI.itemstoreButton.fontSize = 14;
            MenuSurvivorsClothingUI.container.add(MenuSurvivorsClothingUI.itemstoreButton);
            if (Provider.statusData.Stockpile.Has_New_Items)
            {
                SleekNew sleek = new SleekNew(false);
                MenuSurvivorsClothingUI.itemstoreButton.add(sleek);
            }
            if (Provider.statusData.Stockpile.Featured_Item != 0)
            {
                MenuSurvivorsClothingUI.featuredButton = new SleekButton();
                MenuSurvivorsClothingUI.featuredButton.positionOffset_Y = -170;
                MenuSurvivorsClothingUI.featuredButton.positionScale_Y  = 1f;
                MenuSurvivorsClothingUI.featuredButton.sizeOffset_X     = 200;
                MenuSurvivorsClothingUI.featuredButton.sizeOffset_Y     = 50;
                MenuSurvivorsClothingUI.featuredButton.text             = Provider.provider.economyService.getInventoryName(Provider.statusData.Stockpile.Featured_Item);
                MenuSurvivorsClothingUI.featuredButton.tooltip          = MenuSurvivorsClothingUI.localization.format("Featured_Tooltip");
                SleekButton sleekButton7 = MenuSurvivorsClothingUI.featuredButton;
                if (MenuSurvivorsClothingUI.< > f__mg$cache9 == null)
                {
                    MenuSurvivorsClothingUI.< > f__mg$cache9 = new ClickedButton(MenuSurvivorsClothingUI.onClickedFeaturedButton);
                }
                sleekButton7.onClickedButton = MenuSurvivorsClothingUI.< > f__mg$cache9;
                MenuSurvivorsClothingUI.featuredButton.foregroundTint  = ESleekTint.NONE;
                MenuSurvivorsClothingUI.featuredButton.foregroundColor = Provider.provider.economyService.getInventoryColor(Provider.statusData.Stockpile.Featured_Item);
                MenuSurvivorsClothingUI.featuredButton.fontSize        = 14;
                MenuSurvivorsClothingUI.container.add(MenuSurvivorsClothingUI.featuredButton);
                SleekNew sleek2 = new SleekNew(false);
                MenuSurvivorsClothingUI.featuredButton.add(sleek2);
            }
            if (!MenuSurvivorsClothingUI.hasLoaded)
            {
                TempSteamworksEconomy economyService = Provider.provider.economyService;
                Delegate onInventoryRefreshed        = economyService.onInventoryRefreshed;
                if (MenuSurvivorsClothingUI.< > f__mg$cacheA == null)
                {
                    MenuSurvivorsClothingUI.< > f__mg$cacheA = new TempSteamworksEconomy.InventoryRefreshed(MenuSurvivorsClothingUI.onInventoryRefreshed);
                }
                economyService.onInventoryRefreshed = (TempSteamworksEconomy.InventoryRefreshed)Delegate.Combine(onInventoryRefreshed, MenuSurvivorsClothingUI.< > f__mg$cacheA);
                TempSteamworksEconomy economyService2 = Provider.provider.economyService;
                Delegate onInventoryDropped           = economyService2.onInventoryDropped;
                if (MenuSurvivorsClothingUI.< > f__mg$cacheB == null)
                {
                    MenuSurvivorsClothingUI.< > f__mg$cacheB = new TempSteamworksEconomy.InventoryDropped(MenuSurvivorsClothingUI.onInventoryDropped);
                }
                economyService2.onInventoryDropped = (TempSteamworksEconomy.InventoryDropped)Delegate.Combine(onInventoryDropped, MenuSurvivorsClothingUI.< > f__mg$cacheB);
            }
            Delegate onCharacterUpdated = Characters.onCharacterUpdated;

            if (MenuSurvivorsClothingUI.< > f__mg$cacheC == null)
            {
                MenuSurvivorsClothingUI.< > f__mg$cacheC = new CharacterUpdated(MenuSurvivorsClothingUI.onCharacterUpdated);
            }
            Characters.onCharacterUpdated     = (CharacterUpdated)Delegate.Combine(onCharacterUpdated, MenuSurvivorsClothingUI.< > f__mg$cacheC);
            MenuSurvivorsClothingUI.hasLoaded = true;
            MenuSurvivorsClothingUI.updateFilter();
            MenuSurvivorsClothingUI.updatePage();
            new MenuSurvivorsClothingItemUI();
            new MenuSurvivorsClothingInspectUI();
            new MenuSurvivorsClothingDeleteUI();
            new MenuSurvivorsClothingBoxUI();
        }
        public EditorEnvironmentUI()
        {
            Local  local  = Localization.read("/Editor/EditorEnvironment.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorEnvironment/EditorEnvironment.unity3d");

            EditorEnvironmentUI.container = new Sleek();
            EditorEnvironmentUI.container.positionOffset_X = 10;
            EditorEnvironmentUI.container.positionOffset_Y = 10;
            EditorEnvironmentUI.container.positionScale_X  = 1f;
            EditorEnvironmentUI.container.sizeOffset_X     = -20;
            EditorEnvironmentUI.container.sizeOffset_Y     = -20;
            EditorEnvironmentUI.container.sizeScale_X      = 1f;
            EditorEnvironmentUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorEnvironmentUI.container);
            EditorEnvironmentUI.active         = false;
            EditorEnvironmentUI.lightingButton = new SleekButtonIcon((Texture2D)bundle.load("Lighting"));
            EditorEnvironmentUI.lightingButton.positionOffset_Y = 40;
            EditorEnvironmentUI.lightingButton.sizeOffset_X     = -5;
            EditorEnvironmentUI.lightingButton.sizeOffset_Y     = 30;
            EditorEnvironmentUI.lightingButton.sizeScale_X      = 0.25f;
            EditorEnvironmentUI.lightingButton.text             = local.format("LightingButtonText");
            EditorEnvironmentUI.lightingButton.tooltip          = local.format("LightingButtonTooltip");
            SleekButton sleekButton = EditorEnvironmentUI.lightingButton;

            if (EditorEnvironmentUI.< > f__mg$cache0 == null)
            {
                EditorEnvironmentUI.< > f__mg$cache0 = new ClickedButton(EditorEnvironmentUI.onClickedLightingButton);
            }
            sleekButton.onClickedButton = EditorEnvironmentUI.< > f__mg$cache0;
            EditorEnvironmentUI.container.add(EditorEnvironmentUI.lightingButton);
            EditorEnvironmentUI.roadsButton = new SleekButtonIcon((Texture2D)bundle.load("Roads"));
            EditorEnvironmentUI.roadsButton.positionOffset_X = 5;
            EditorEnvironmentUI.roadsButton.positionOffset_Y = 40;
            EditorEnvironmentUI.roadsButton.positionScale_X  = 0.25f;
            EditorEnvironmentUI.roadsButton.sizeOffset_X     = -10;
            EditorEnvironmentUI.roadsButton.sizeOffset_Y     = 30;
            EditorEnvironmentUI.roadsButton.sizeScale_X      = 0.25f;
            EditorEnvironmentUI.roadsButton.text             = local.format("RoadsButtonText");
            EditorEnvironmentUI.roadsButton.tooltip          = local.format("RoadsButtonTooltip");
            SleekButton sleekButton2 = EditorEnvironmentUI.roadsButton;

            if (EditorEnvironmentUI.< > f__mg$cache1 == null)
            {
                EditorEnvironmentUI.< > f__mg$cache1 = new ClickedButton(EditorEnvironmentUI.onClickedRoadsButton);
            }
            sleekButton2.onClickedButton = EditorEnvironmentUI.< > f__mg$cache1;
            EditorEnvironmentUI.container.add(EditorEnvironmentUI.roadsButton);
            EditorEnvironmentUI.navigationButton = new SleekButtonIcon((Texture2D)bundle.load("Navigation"));
            EditorEnvironmentUI.navigationButton.positionOffset_X = 5;
            EditorEnvironmentUI.navigationButton.positionOffset_Y = 40;
            EditorEnvironmentUI.navigationButton.positionScale_X  = 0.5f;
            EditorEnvironmentUI.navigationButton.sizeOffset_X     = -10;
            EditorEnvironmentUI.navigationButton.sizeOffset_Y     = 30;
            EditorEnvironmentUI.navigationButton.sizeScale_X      = 0.25f;
            EditorEnvironmentUI.navigationButton.text             = local.format("NavigationButtonText");
            EditorEnvironmentUI.navigationButton.tooltip          = local.format("NavigationButtonTooltip");
            SleekButton sleekButton3 = EditorEnvironmentUI.navigationButton;

            if (EditorEnvironmentUI.< > f__mg$cache2 == null)
            {
                EditorEnvironmentUI.< > f__mg$cache2 = new ClickedButton(EditorEnvironmentUI.onClickedNavigationButton);
            }
            sleekButton3.onClickedButton = EditorEnvironmentUI.< > f__mg$cache2;
            EditorEnvironmentUI.container.add(EditorEnvironmentUI.navigationButton);
            EditorEnvironmentUI.nodesButton = new SleekButtonIcon((Texture2D)bundle.load("Nodes"));
            EditorEnvironmentUI.nodesButton.positionOffset_X = 5;
            EditorEnvironmentUI.nodesButton.positionOffset_Y = 40;
            EditorEnvironmentUI.nodesButton.positionScale_X  = 0.75f;
            EditorEnvironmentUI.nodesButton.sizeOffset_X     = -5;
            EditorEnvironmentUI.nodesButton.sizeOffset_Y     = 30;
            EditorEnvironmentUI.nodesButton.sizeScale_X      = 0.25f;
            EditorEnvironmentUI.nodesButton.text             = local.format("NodesButtonText");
            EditorEnvironmentUI.nodesButton.tooltip          = local.format("NodesButtonTooltip");
            SleekButton sleekButton4 = EditorEnvironmentUI.nodesButton;

            if (EditorEnvironmentUI.< > f__mg$cache3 == null)
            {
                EditorEnvironmentUI.< > f__mg$cache3 = new ClickedButton(EditorEnvironmentUI.onClickedNodesButton);
            }
            sleekButton4.onClickedButton = EditorEnvironmentUI.< > f__mg$cache3;
            EditorEnvironmentUI.container.add(EditorEnvironmentUI.nodesButton);
            bundle.unload();
            new EditorEnvironmentLightingUI();
            new EditorEnvironmentRoadsUI();
            new EditorEnvironmentNavigationUI();
            new EditorEnvironmentNodesUI();
        }
Example #5
0
        public MenuConfigurationUI()
        {
            Local  local  = Localization.read("/Menu/Configuration/MenuConfiguration.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Configuration/MenuConfiguration/MenuConfiguration.unity3d");

            MenuConfigurationUI.container = new Sleek();
            MenuConfigurationUI.container.positionOffset_X = 10;
            MenuConfigurationUI.container.positionOffset_Y = 10;
            MenuConfigurationUI.container.positionScale_Y  = -1f;
            MenuConfigurationUI.container.sizeOffset_X     = -20;
            MenuConfigurationUI.container.sizeOffset_Y     = -20;
            MenuConfigurationUI.container.sizeScale_X      = 1f;
            MenuConfigurationUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuConfigurationUI.container);
            MenuConfigurationUI.active        = false;
            MenuConfigurationUI.optionsButton = new SleekButtonIcon((Texture2D)bundle.load("Options"));
            MenuConfigurationUI.optionsButton.positionOffset_X = -100;
            MenuConfigurationUI.optionsButton.positionOffset_Y = -145;
            MenuConfigurationUI.optionsButton.positionScale_X  = 0.5f;
            MenuConfigurationUI.optionsButton.positionScale_Y  = 0.5f;
            MenuConfigurationUI.optionsButton.sizeOffset_X     = 200;
            MenuConfigurationUI.optionsButton.sizeOffset_Y     = 50;
            MenuConfigurationUI.optionsButton.text             = local.format("Options_Button_Text");
            MenuConfigurationUI.optionsButton.tooltip          = local.format("Options_Button_Tooltip");
            SleekButton sleekButton = MenuConfigurationUI.optionsButton;

            if (MenuConfigurationUI.< > f__mg$cache0 == null)
            {
                MenuConfigurationUI.< > f__mg$cache0 = new ClickedButton(MenuConfigurationUI.onClickedOptionsButton);
            }
            sleekButton.onClickedButton = MenuConfigurationUI.< > f__mg$cache0;
            MenuConfigurationUI.optionsButton.fontSize = 14;
            MenuConfigurationUI.optionsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationUI.container.add(MenuConfigurationUI.optionsButton);
            MenuConfigurationUI.displayButton = new SleekButtonIcon((Texture2D)bundle.load("Display"));
            MenuConfigurationUI.displayButton.positionOffset_X = -100;
            MenuConfigurationUI.displayButton.positionOffset_Y = -85;
            MenuConfigurationUI.displayButton.positionScale_X  = 0.5f;
            MenuConfigurationUI.displayButton.positionScale_Y  = 0.5f;
            MenuConfigurationUI.displayButton.sizeOffset_X     = 200;
            MenuConfigurationUI.displayButton.sizeOffset_Y     = 50;
            MenuConfigurationUI.displayButton.text             = local.format("Display_Button_Text");
            MenuConfigurationUI.displayButton.tooltip          = local.format("Display_Button_Tooltip");
            SleekButton sleekButton2 = MenuConfigurationUI.displayButton;

            if (MenuConfigurationUI.< > f__mg$cache1 == null)
            {
                MenuConfigurationUI.< > f__mg$cache1 = new ClickedButton(MenuConfigurationUI.onClickedDisplayButton);
            }
            sleekButton2.onClickedButton = MenuConfigurationUI.< > f__mg$cache1;
            MenuConfigurationUI.displayButton.fontSize = 14;
            MenuConfigurationUI.displayButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationUI.container.add(MenuConfigurationUI.displayButton);
            MenuConfigurationUI.graphicsButton = new SleekButtonIcon((Texture2D)bundle.load("Graphics"));
            MenuConfigurationUI.graphicsButton.positionOffset_X = -100;
            MenuConfigurationUI.graphicsButton.positionOffset_Y = -25;
            MenuConfigurationUI.graphicsButton.positionScale_X  = 0.5f;
            MenuConfigurationUI.graphicsButton.positionScale_Y  = 0.5f;
            MenuConfigurationUI.graphicsButton.sizeOffset_X     = 200;
            MenuConfigurationUI.graphicsButton.sizeOffset_Y     = 50;
            MenuConfigurationUI.graphicsButton.text             = local.format("Graphics_Button_Text");
            MenuConfigurationUI.graphicsButton.tooltip          = local.format("Graphics_Button_Tooltip");
            SleekButton sleekButton3 = MenuConfigurationUI.graphicsButton;

            if (MenuConfigurationUI.< > f__mg$cache2 == null)
            {
                MenuConfigurationUI.< > f__mg$cache2 = new ClickedButton(MenuConfigurationUI.onClickedGraphicsButton);
            }
            sleekButton3.onClickedButton = MenuConfigurationUI.< > f__mg$cache2;
            MenuConfigurationUI.graphicsButton.fontSize = 14;
            MenuConfigurationUI.graphicsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationUI.container.add(MenuConfigurationUI.graphicsButton);
            MenuConfigurationUI.controlsButton = new SleekButtonIcon((Texture2D)bundle.load("Controls"));
            MenuConfigurationUI.controlsButton.positionOffset_X = -100;
            MenuConfigurationUI.controlsButton.positionOffset_Y = 35;
            MenuConfigurationUI.controlsButton.positionScale_X  = 0.5f;
            MenuConfigurationUI.controlsButton.positionScale_Y  = 0.5f;
            MenuConfigurationUI.controlsButton.sizeOffset_X     = 200;
            MenuConfigurationUI.controlsButton.sizeOffset_Y     = 50;
            MenuConfigurationUI.controlsButton.text             = local.format("Controls_Button_Text");
            MenuConfigurationUI.controlsButton.tooltip          = local.format("Controls_Button_Tooltip");
            SleekButton sleekButton4 = MenuConfigurationUI.controlsButton;

            if (MenuConfigurationUI.< > f__mg$cache3 == null)
            {
                MenuConfigurationUI.< > f__mg$cache3 = new ClickedButton(MenuConfigurationUI.onClickedControlsButton);
            }
            sleekButton4.onClickedButton = MenuConfigurationUI.< > f__mg$cache3;
            MenuConfigurationUI.controlsButton.fontSize = 14;
            MenuConfigurationUI.controlsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationUI.container.add(MenuConfigurationUI.controlsButton);
            MenuConfigurationUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuConfigurationUI.backButton.positionOffset_X = -100;
            MenuConfigurationUI.backButton.positionOffset_Y = 95;
            MenuConfigurationUI.backButton.positionScale_X  = 0.5f;
            MenuConfigurationUI.backButton.positionScale_Y  = 0.5f;
            MenuConfigurationUI.backButton.sizeOffset_X     = 200;
            MenuConfigurationUI.backButton.sizeOffset_Y     = 50;
            MenuConfigurationUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuConfigurationUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton5 = MenuConfigurationUI.backButton;

            if (MenuConfigurationUI.< > f__mg$cache4 == null)
            {
                MenuConfigurationUI.< > f__mg$cache4 = new ClickedButton(MenuConfigurationUI.onClickedBackButton);
            }
            sleekButton5.onClickedButton            = MenuConfigurationUI.< > f__mg$cache4;
            MenuConfigurationUI.backButton.fontSize = 14;
            MenuConfigurationUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuConfigurationUI.container.add(MenuConfigurationUI.backButton);
            bundle.unload();
            new MenuConfigurationOptionsUI();
            new MenuConfigurationDisplayUI();
            new MenuConfigurationGraphicsUI();
            new MenuConfigurationControlsUI();
        }
Example #6
0
        // Token: 0x060035D9 RID: 13785 RVA: 0x0016AC40 File Offset: 0x00169040
        public EditorTerrainUI()
        {
            Local  local  = Localization.read("/Editor/EditorTerrain.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrain/EditorTerrain.unity3d");

            EditorTerrainUI.container = new Sleek();
            EditorTerrainUI.container.positionOffset_X = 10;
            EditorTerrainUI.container.positionOffset_Y = 10;
            EditorTerrainUI.container.positionScale_X  = 1f;
            EditorTerrainUI.container.sizeOffset_X     = -20;
            EditorTerrainUI.container.sizeOffset_Y     = -20;
            EditorTerrainUI.container.sizeScale_X      = 1f;
            EditorTerrainUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorTerrainUI.container);
            EditorTerrainUI.active       = false;
            EditorTerrainUI.heightButton = new SleekButtonIcon((Texture2D)bundle.load("Height"));
            EditorTerrainUI.heightButton.positionOffset_Y = 40;
            EditorTerrainUI.heightButton.sizeOffset_X     = -5;
            EditorTerrainUI.heightButton.sizeOffset_Y     = 30;
            EditorTerrainUI.heightButton.sizeScale_X      = 0.25f;
            EditorTerrainUI.heightButton.text             = local.format("HeightButtonText");
            EditorTerrainUI.heightButton.tooltip          = local.format("HeightButtonTooltip");
            SleekButton sleekButton = EditorTerrainUI.heightButton;

            if (EditorTerrainUI.< > f__mg$cache0 == null)
            {
                EditorTerrainUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainUI.onClickedHeightButton);
            }
            sleekButton.onClickedButton = EditorTerrainUI.< > f__mg$cache0;
            EditorTerrainUI.container.add(EditorTerrainUI.heightButton);
            EditorTerrainUI.materialsButton = new SleekButtonIcon((Texture2D)bundle.load("Materials"));
            EditorTerrainUI.materialsButton.positionOffset_X = 5;
            EditorTerrainUI.materialsButton.positionOffset_Y = 40;
            EditorTerrainUI.materialsButton.positionScale_X  = 0.25f;
            EditorTerrainUI.materialsButton.sizeOffset_X     = -10;
            EditorTerrainUI.materialsButton.sizeOffset_Y     = 30;
            EditorTerrainUI.materialsButton.sizeScale_X      = 0.25f;
            EditorTerrainUI.materialsButton.text             = local.format("MaterialsButtonText");
            EditorTerrainUI.materialsButton.tooltip          = local.format("MaterialsButtonTooltip");
            SleekButton sleekButton2 = EditorTerrainUI.materialsButton;

            if (EditorTerrainUI.< > f__mg$cache1 == null)
            {
                EditorTerrainUI.< > f__mg$cache1 = new ClickedButton(EditorTerrainUI.onClickedMaterialsButton);
            }
            sleekButton2.onClickedButton = EditorTerrainUI.< > f__mg$cache1;
            EditorTerrainUI.container.add(EditorTerrainUI.materialsButton);
            EditorTerrainUI.detailsButton = new SleekButtonIcon((Texture2D)bundle.load("Details"));
            EditorTerrainUI.detailsButton.positionOffset_X = 5;
            EditorTerrainUI.detailsButton.positionOffset_Y = 40;
            EditorTerrainUI.detailsButton.positionScale_X  = 0.5f;
            EditorTerrainUI.detailsButton.sizeOffset_X     = -10;
            EditorTerrainUI.detailsButton.sizeOffset_Y     = 30;
            EditorTerrainUI.detailsButton.sizeScale_X      = 0.25f;
            EditorTerrainUI.detailsButton.text             = local.format("DetailsButtonText");
            EditorTerrainUI.detailsButton.tooltip          = local.format("DetailsButtonTooltip");
            SleekButton sleekButton3 = EditorTerrainUI.detailsButton;

            if (EditorTerrainUI.< > f__mg$cache2 == null)
            {
                EditorTerrainUI.< > f__mg$cache2 = new ClickedButton(EditorTerrainUI.onClickedDetailsButton);
            }
            sleekButton3.onClickedButton = EditorTerrainUI.< > f__mg$cache2;
            EditorTerrainUI.container.add(EditorTerrainUI.detailsButton);
            EditorTerrainUI.resourcesButton = new SleekButtonIcon((Texture2D)bundle.load("Resources"));
            EditorTerrainUI.resourcesButton.positionOffset_X = 5;
            EditorTerrainUI.resourcesButton.positionOffset_Y = 40;
            EditorTerrainUI.resourcesButton.positionScale_X  = 0.75f;
            EditorTerrainUI.resourcesButton.sizeOffset_X     = -5;
            EditorTerrainUI.resourcesButton.sizeOffset_Y     = 30;
            EditorTerrainUI.resourcesButton.sizeScale_X      = 0.25f;
            EditorTerrainUI.resourcesButton.text             = local.format("ResourcesButtonText");
            EditorTerrainUI.resourcesButton.tooltip          = local.format("ResourcesButtonTooltip");
            SleekButton sleekButton4 = EditorTerrainUI.resourcesButton;

            if (EditorTerrainUI.< > f__mg$cache3 == null)
            {
                EditorTerrainUI.< > f__mg$cache3 = new ClickedButton(EditorTerrainUI.onClickedResourcesButton);
            }
            sleekButton4.onClickedButton = EditorTerrainUI.< > f__mg$cache3;
            EditorTerrainUI.container.add(EditorTerrainUI.resourcesButton);
            bundle.unload();
            new EditorTerrainHeightUI();
            new EditorTerrainMaterialsUI();
            new EditorTerrainDetailsUI();
            new EditorTerrainResourcesUI();
        }
        public EditorLevelObjectsUI()
        {
            Local  local  = Localization.read("/Editor/EditorLevelObjects.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorLevelObjects/EditorLevelObjects.unity3d");

            EditorLevelObjectsUI.container = new Sleek();
            EditorLevelObjectsUI.container.positionOffset_X = 10;
            EditorLevelObjectsUI.container.positionOffset_Y = 10;
            EditorLevelObjectsUI.container.positionScale_X  = 1f;
            EditorLevelObjectsUI.container.sizeOffset_X     = -20;
            EditorLevelObjectsUI.container.sizeOffset_Y     = -20;
            EditorLevelObjectsUI.container.sizeScale_X      = 1f;
            EditorLevelObjectsUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorLevelObjectsUI.container);
            EditorLevelObjectsUI.active      = false;
            EditorLevelObjectsUI.assets      = new List <Asset>();
            EditorLevelObjectsUI.selectedBox = new SleekBox();
            EditorLevelObjectsUI.selectedBox.positionOffset_X = -230;
            EditorLevelObjectsUI.selectedBox.positionOffset_Y = 80;
            EditorLevelObjectsUI.selectedBox.positionScale_X  = 1f;
            EditorLevelObjectsUI.selectedBox.sizeOffset_X     = 230;
            EditorLevelObjectsUI.selectedBox.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.selectedBox.addLabel(local.format("SelectionBoxLabelText"), ESleekSide.LEFT);
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.selectedBox);
            EditorLevelObjectsUI.searchField = new SleekField();
            EditorLevelObjectsUI.searchField.positionOffset_X = -230;
            EditorLevelObjectsUI.searchField.positionOffset_Y = 120;
            EditorLevelObjectsUI.searchField.positionScale_X  = 1f;
            EditorLevelObjectsUI.searchField.sizeOffset_X     = 160;
            EditorLevelObjectsUI.searchField.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.searchField.hint             = local.format("Search_Field_Hint");
            EditorLevelObjectsUI.searchField.control          = "Search";
            SleekField sleekField = EditorLevelObjectsUI.searchField;

            if (EditorLevelObjectsUI.< > f__mg$cache1 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache1 = new Entered(EditorLevelObjectsUI.onEnteredSearchField);
            }
            sleekField.onEntered = EditorLevelObjectsUI.< > f__mg$cache1;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.searchField);
            EditorLevelObjectsUI.searchButton = new SleekButton();
            EditorLevelObjectsUI.searchButton.positionOffset_X = -60;
            EditorLevelObjectsUI.searchButton.positionOffset_Y = 120;
            EditorLevelObjectsUI.searchButton.positionScale_X  = 1f;
            EditorLevelObjectsUI.searchButton.sizeOffset_X     = 60;
            EditorLevelObjectsUI.searchButton.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.searchButton.text             = local.format("Search");
            EditorLevelObjectsUI.searchButton.tooltip          = local.format("Search_Tooltip");
            SleekButton sleekButton = EditorLevelObjectsUI.searchButton;

            if (EditorLevelObjectsUI.< > f__mg$cache2 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache2 = new ClickedButton(EditorLevelObjectsUI.onClickedSearchButton);
            }
            sleekButton.onClickedButton = EditorLevelObjectsUI.< > f__mg$cache2;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.searchButton);
            EditorLevelObjectsUI.largeToggle = new SleekToggle();
            EditorLevelObjectsUI.largeToggle.positionOffset_X = -230;
            EditorLevelObjectsUI.largeToggle.positionOffset_Y = 160;
            EditorLevelObjectsUI.largeToggle.positionScale_X  = 1f;
            EditorLevelObjectsUI.largeToggle.sizeOffset_X     = 40;
            EditorLevelObjectsUI.largeToggle.sizeOffset_Y     = 40;
            EditorLevelObjectsUI.largeToggle.addLabel(local.format("LargeLabel"), ESleekSide.RIGHT);
            EditorLevelObjectsUI.largeToggle.state = true;
            SleekToggle sleekToggle = EditorLevelObjectsUI.largeToggle;

            if (EditorLevelObjectsUI.< > f__mg$cache3 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache3 = new Toggled(EditorLevelObjectsUI.onToggledLargeToggle);
            }
            sleekToggle.onToggled = EditorLevelObjectsUI.< > f__mg$cache3;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.largeToggle);
            EditorLevelObjectsUI.mediumToggle = new SleekToggle();
            EditorLevelObjectsUI.mediumToggle.positionOffset_X = -230;
            EditorLevelObjectsUI.mediumToggle.positionOffset_Y = 210;
            EditorLevelObjectsUI.mediumToggle.positionScale_X  = 1f;
            EditorLevelObjectsUI.mediumToggle.sizeOffset_X     = 40;
            EditorLevelObjectsUI.mediumToggle.sizeOffset_Y     = 40;
            EditorLevelObjectsUI.mediumToggle.addLabel(local.format("MediumLabel"), ESleekSide.RIGHT);
            EditorLevelObjectsUI.mediumToggle.state = true;
            SleekToggle sleekToggle2 = EditorLevelObjectsUI.mediumToggle;

            if (EditorLevelObjectsUI.< > f__mg$cache4 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache4 = new Toggled(EditorLevelObjectsUI.onToggledMediumToggle);
            }
            sleekToggle2.onToggled = EditorLevelObjectsUI.< > f__mg$cache4;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.mediumToggle);
            EditorLevelObjectsUI.smallToggle = new SleekToggle();
            EditorLevelObjectsUI.smallToggle.positionOffset_X = -230;
            EditorLevelObjectsUI.smallToggle.positionOffset_Y = 260;
            EditorLevelObjectsUI.smallToggle.positionScale_X  = 1f;
            EditorLevelObjectsUI.smallToggle.sizeOffset_X     = 40;
            EditorLevelObjectsUI.smallToggle.sizeOffset_Y     = 40;
            EditorLevelObjectsUI.smallToggle.addLabel(local.format("SmallLabel"), ESleekSide.RIGHT);
            EditorLevelObjectsUI.smallToggle.state = true;
            SleekToggle sleekToggle3 = EditorLevelObjectsUI.smallToggle;

            if (EditorLevelObjectsUI.< > f__mg$cache5 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache5 = new Toggled(EditorLevelObjectsUI.onToggledSmallToggle);
            }
            sleekToggle3.onToggled = EditorLevelObjectsUI.< > f__mg$cache5;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.smallToggle);
            EditorLevelObjectsUI.barricadesToggle = new SleekToggle();
            EditorLevelObjectsUI.barricadesToggle.positionOffset_X = -130;
            EditorLevelObjectsUI.barricadesToggle.positionOffset_Y = 160;
            EditorLevelObjectsUI.barricadesToggle.positionScale_X  = 1f;
            EditorLevelObjectsUI.barricadesToggle.sizeOffset_X     = 40;
            EditorLevelObjectsUI.barricadesToggle.sizeOffset_Y     = 40;
            EditorLevelObjectsUI.barricadesToggle.addLabel(local.format("BarricadesLabel"), ESleekSide.RIGHT);
            EditorLevelObjectsUI.barricadesToggle.state = true;
            SleekToggle sleekToggle4 = EditorLevelObjectsUI.barricadesToggle;

            if (EditorLevelObjectsUI.< > f__mg$cache6 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache6 = new Toggled(EditorLevelObjectsUI.onToggledBarricadesToggle);
            }
            sleekToggle4.onToggled = EditorLevelObjectsUI.< > f__mg$cache6;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.barricadesToggle);
            EditorLevelObjectsUI.structuresToggle = new SleekToggle();
            EditorLevelObjectsUI.structuresToggle.positionOffset_X = -130;
            EditorLevelObjectsUI.structuresToggle.positionOffset_Y = 210;
            EditorLevelObjectsUI.structuresToggle.positionScale_X  = 1f;
            EditorLevelObjectsUI.structuresToggle.sizeOffset_X     = 40;
            EditorLevelObjectsUI.structuresToggle.sizeOffset_Y     = 40;
            EditorLevelObjectsUI.structuresToggle.addLabel(local.format("StructuresLabel"), ESleekSide.RIGHT);
            EditorLevelObjectsUI.structuresToggle.state = true;
            SleekToggle sleekToggle5 = EditorLevelObjectsUI.structuresToggle;

            if (EditorLevelObjectsUI.< > f__mg$cache7 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache7 = new Toggled(EditorLevelObjectsUI.onToggledStructuresToggle);
            }
            sleekToggle5.onToggled = EditorLevelObjectsUI.< > f__mg$cache7;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.structuresToggle);
            EditorLevelObjectsUI.npcsToggle = new SleekToggle();
            EditorLevelObjectsUI.npcsToggle.positionOffset_X = -130;
            EditorLevelObjectsUI.npcsToggle.positionOffset_Y = 260;
            EditorLevelObjectsUI.npcsToggle.positionScale_X  = 1f;
            EditorLevelObjectsUI.npcsToggle.sizeOffset_X     = 40;
            EditorLevelObjectsUI.npcsToggle.sizeOffset_Y     = 40;
            EditorLevelObjectsUI.npcsToggle.addLabel(local.format("NPCsLabel"), ESleekSide.RIGHT);
            EditorLevelObjectsUI.npcsToggle.state = true;
            SleekToggle sleekToggle6 = EditorLevelObjectsUI.npcsToggle;

            if (EditorLevelObjectsUI.< > f__mg$cache8 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache8 = new Toggled(EditorLevelObjectsUI.onToggledNPCsToggle);
            }
            sleekToggle6.onToggled = EditorLevelObjectsUI.< > f__mg$cache8;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.npcsToggle);
            EditorLevelObjectsUI.assetsScrollBox = new SleekScrollBox();
            EditorLevelObjectsUI.assetsScrollBox.positionOffset_X = -230;
            EditorLevelObjectsUI.assetsScrollBox.positionOffset_Y = 310;
            EditorLevelObjectsUI.assetsScrollBox.positionScale_X  = 1f;
            EditorLevelObjectsUI.assetsScrollBox.sizeOffset_X     = 230;
            EditorLevelObjectsUI.assetsScrollBox.sizeOffset_Y     = -310;
            EditorLevelObjectsUI.assetsScrollBox.sizeScale_Y      = 1f;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.assetsScrollBox);
            EditorObjects.selectedObjectAsset = null;
            EditorObjects.selectedItemAsset   = null;
            if (EditorLevelObjectsUI.< > f__mg$cache9 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache9 = new DragStarted(EditorLevelObjectsUI.onDragStarted);
            }
            EditorObjects.onDragStarted = EditorLevelObjectsUI.< > f__mg$cache9;
            if (EditorLevelObjectsUI.< > f__mg$cacheA == null)
            {
                EditorLevelObjectsUI.< > f__mg$cacheA = new DragStopped(EditorLevelObjectsUI.onDragStopped);
            }
            EditorObjects.onDragStopped  = EditorLevelObjectsUI.< > f__mg$cacheA;
            EditorLevelObjectsUI.dragBox = new SleekBox();
            EditorUI.window.add(EditorLevelObjectsUI.dragBox);
            EditorLevelObjectsUI.dragBox.isVisible  = false;
            EditorLevelObjectsUI.snapTransformField = new SleekSingleField();
            EditorLevelObjectsUI.snapTransformField.positionOffset_Y = -230;
            EditorLevelObjectsUI.snapTransformField.positionScale_Y  = 1f;
            EditorLevelObjectsUI.snapTransformField.sizeOffset_X     = 200;
            EditorLevelObjectsUI.snapTransformField.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.snapTransformField.text             = (Mathf.Floor(EditorObjects.snapTransform * 100f) / 100f).ToString();
            EditorLevelObjectsUI.snapTransformField.addLabel(local.format("SnapTransformLabelText"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField = EditorLevelObjectsUI.snapTransformField;

            if (EditorLevelObjectsUI.< > f__mg$cacheB == null)
            {
                EditorLevelObjectsUI.< > f__mg$cacheB = new TypedSingle(EditorLevelObjectsUI.onTypedSnapTransformField);
            }
            sleekSingleField.onTypedSingle = EditorLevelObjectsUI.< > f__mg$cacheB;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.snapTransformField);
            EditorLevelObjectsUI.snapRotationField = new SleekSingleField();
            EditorLevelObjectsUI.snapRotationField.positionOffset_Y = -190;
            EditorLevelObjectsUI.snapRotationField.positionScale_Y  = 1f;
            EditorLevelObjectsUI.snapRotationField.sizeOffset_X     = 200;
            EditorLevelObjectsUI.snapRotationField.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.snapRotationField.text             = (Mathf.Floor(EditorObjects.snapRotation * 100f) / 100f).ToString();
            EditorLevelObjectsUI.snapRotationField.addLabel(local.format("SnapRotationLabelText"), ESleekSide.RIGHT);
            SleekSingleField sleekSingleField2 = EditorLevelObjectsUI.snapRotationField;

            if (EditorLevelObjectsUI.< > f__mg$cacheC == null)
            {
                EditorLevelObjectsUI.< > f__mg$cacheC = new TypedSingle(EditorLevelObjectsUI.onTypedSnapRotationField);
            }
            sleekSingleField2.onTypedSingle = EditorLevelObjectsUI.< > f__mg$cacheC;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.snapRotationField);
            EditorLevelObjectsUI.transformButton = new SleekButtonIcon((Texture2D)bundle.load("Transform"));
            EditorLevelObjectsUI.transformButton.positionOffset_Y = -150;
            EditorLevelObjectsUI.transformButton.positionScale_Y  = 1f;
            EditorLevelObjectsUI.transformButton.sizeOffset_X     = 200;
            EditorLevelObjectsUI.transformButton.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.transformButton.text             = local.format("TransformButtonText", new object[]
            {
                ControlsSettings.tool_0
            });
            EditorLevelObjectsUI.transformButton.tooltip = local.format("TransformButtonTooltip");
            SleekButton sleekButton2 = EditorLevelObjectsUI.transformButton;

            if (EditorLevelObjectsUI.< > f__mg$cacheD == null)
            {
                EditorLevelObjectsUI.< > f__mg$cacheD = new ClickedButton(EditorLevelObjectsUI.onClickedTransformButton);
            }
            sleekButton2.onClickedButton = EditorLevelObjectsUI.< > f__mg$cacheD;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.transformButton);
            EditorLevelObjectsUI.rotateButton = new SleekButtonIcon((Texture2D)bundle.load("Rotate"));
            EditorLevelObjectsUI.rotateButton.positionOffset_Y = -110;
            EditorLevelObjectsUI.rotateButton.positionScale_Y  = 1f;
            EditorLevelObjectsUI.rotateButton.sizeOffset_X     = 200;
            EditorLevelObjectsUI.rotateButton.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.rotateButton.text             = local.format("RotateButtonText", new object[]
            {
                ControlsSettings.tool_1
            });
            EditorLevelObjectsUI.rotateButton.tooltip = local.format("RotateButtonTooltip");
            SleekButton sleekButton3 = EditorLevelObjectsUI.rotateButton;

            if (EditorLevelObjectsUI.< > f__mg$cacheE == null)
            {
                EditorLevelObjectsUI.< > f__mg$cacheE = new ClickedButton(EditorLevelObjectsUI.onClickedRotateButton);
            }
            sleekButton3.onClickedButton = EditorLevelObjectsUI.< > f__mg$cacheE;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.rotateButton);
            EditorLevelObjectsUI.scaleButton = new SleekButtonIcon((Texture2D)bundle.load("Scale"));
            EditorLevelObjectsUI.scaleButton.positionOffset_Y = -70;
            EditorLevelObjectsUI.scaleButton.positionScale_Y  = 1f;
            EditorLevelObjectsUI.scaleButton.sizeOffset_X     = 200;
            EditorLevelObjectsUI.scaleButton.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.scaleButton.text             = local.format("ScaleButtonText", new object[]
            {
                ControlsSettings.tool_3
            });
            EditorLevelObjectsUI.scaleButton.tooltip = local.format("ScaleButtonTooltip");
            SleekButton sleekButton4 = EditorLevelObjectsUI.scaleButton;

            if (EditorLevelObjectsUI.< > f__mg$cacheF == null)
            {
                EditorLevelObjectsUI.< > f__mg$cacheF = new ClickedButton(EditorLevelObjectsUI.onClickedScaleButton);
            }
            sleekButton4.onClickedButton = EditorLevelObjectsUI.< > f__mg$cacheF;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.scaleButton);
            EditorLevelObjectsUI.coordinateButton = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(local.format("CoordinateButtonTextGlobal"), (Texture)bundle.load("Global")),
                new GUIContent(local.format("CoordinateButtonTextLocal"), (Texture)bundle.load("Local"))
            });
            EditorLevelObjectsUI.coordinateButton.positionOffset_Y = -30;
            EditorLevelObjectsUI.coordinateButton.positionScale_Y  = 1f;
            EditorLevelObjectsUI.coordinateButton.sizeOffset_X     = 200;
            EditorLevelObjectsUI.coordinateButton.sizeOffset_Y     = 30;
            EditorLevelObjectsUI.coordinateButton.tooltip          = local.format("CoordinateButtonTooltip");
            SleekButtonState sleekButtonState = EditorLevelObjectsUI.coordinateButton;

            if (EditorLevelObjectsUI.< > f__mg$cache10 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache10 = new SwappedState(EditorLevelObjectsUI.onSwappedStateCoordinate);
            }
            sleekButtonState.onSwappedState = EditorLevelObjectsUI.< > f__mg$cache10;
            EditorLevelObjectsUI.container.add(EditorLevelObjectsUI.coordinateButton);
            bundle.unload();
            EditorLevelObjectsUI.onAssetsRefreshed();
            if (EditorLevelObjectsUI.< > f__mg$cache11 == null)
            {
                EditorLevelObjectsUI.< > f__mg$cache11 = new AssetsRefreshed(EditorLevelObjectsUI.onAssetsRefreshed);
            }
            Assets.onAssetsRefreshed = EditorLevelObjectsUI.< > f__mg$cache11;
        }
        public MenuWorkshopEditorUI()
        {
            if (MenuWorkshopEditorUI.icons != null)
            {
                MenuWorkshopEditorUI.icons.unload();
                MenuWorkshopEditorUI.icons = null;
            }
            Local local = Localization.read("/Menu/Workshop/MenuWorkshopEditor.dat");

            MenuWorkshopEditorUI.icons     = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Workshop/MenuWorkshopEditor/MenuWorkshopEditor.unity3d");
            MenuWorkshopEditorUI.container = new Sleek();
            MenuWorkshopEditorUI.container.positionOffset_X = 10;
            MenuWorkshopEditorUI.container.positionOffset_Y = 10;
            MenuWorkshopEditorUI.container.positionScale_Y  = 1f;
            MenuWorkshopEditorUI.container.sizeOffset_X     = -20;
            MenuWorkshopEditorUI.container.sizeOffset_Y     = -20;
            MenuWorkshopEditorUI.container.sizeScale_X      = 1f;
            MenuWorkshopEditorUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuWorkshopEditorUI.container);
            MenuWorkshopEditorUI.active     = false;
            MenuWorkshopEditorUI.previewBox = new SleekBox();
            MenuWorkshopEditorUI.previewBox.positionOffset_X = -305;
            MenuWorkshopEditorUI.previewBox.positionOffset_Y = 100;
            MenuWorkshopEditorUI.previewBox.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.previewBox.sizeOffset_X     = 340;
            MenuWorkshopEditorUI.previewBox.sizeOffset_Y     = 180;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.previewBox);
            MenuWorkshopEditorUI.previewImage = new SleekImageTexture();
            MenuWorkshopEditorUI.previewImage.positionOffset_X     = 10;
            MenuWorkshopEditorUI.previewImage.positionOffset_Y     = 10;
            MenuWorkshopEditorUI.previewImage.sizeOffset_X         = -20;
            MenuWorkshopEditorUI.previewImage.sizeOffset_Y         = -20;
            MenuWorkshopEditorUI.previewImage.sizeScale_X          = 1f;
            MenuWorkshopEditorUI.previewImage.sizeScale_Y          = 1f;
            MenuWorkshopEditorUI.previewImage.shouldDestroyTexture = true;
            MenuWorkshopEditorUI.previewBox.add(MenuWorkshopEditorUI.previewImage);
            MenuWorkshopEditorUI.levelScrollBox = new SleekScrollBox();
            MenuWorkshopEditorUI.levelScrollBox.positionOffset_X = -95;
            MenuWorkshopEditorUI.levelScrollBox.positionOffset_Y = 290;
            MenuWorkshopEditorUI.levelScrollBox.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.levelScrollBox.sizeOffset_X     = 430;
            MenuWorkshopEditorUI.levelScrollBox.sizeOffset_Y     = -390;
            MenuWorkshopEditorUI.levelScrollBox.sizeScale_Y      = 1f;
            MenuWorkshopEditorUI.levelScrollBox.area             = new Rect(0f, 0f, 5f, 0f);
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.levelScrollBox);
            MenuWorkshopEditorUI.selectedBox = new SleekBox();
            MenuWorkshopEditorUI.selectedBox.positionOffset_X = 45;
            MenuWorkshopEditorUI.selectedBox.positionOffset_Y = 100;
            MenuWorkshopEditorUI.selectedBox.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.selectedBox.sizeOffset_X     = 260;
            MenuWorkshopEditorUI.selectedBox.sizeOffset_Y     = 30;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.selectedBox);
            MenuWorkshopEditorUI.descriptionBox = new SleekBox();
            MenuWorkshopEditorUI.descriptionBox.positionOffset_X = 45;
            MenuWorkshopEditorUI.descriptionBox.positionOffset_Y = 140;
            MenuWorkshopEditorUI.descriptionBox.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.descriptionBox.sizeOffset_X     = 260;
            MenuWorkshopEditorUI.descriptionBox.sizeOffset_Y     = 140;
            MenuWorkshopEditorUI.descriptionBox.fontAlignment    = 1;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.descriptionBox);
            MenuWorkshopEditorUI.mapNameField = new SleekField();
            MenuWorkshopEditorUI.mapNameField.positionOffset_X = -305;
            MenuWorkshopEditorUI.mapNameField.positionOffset_Y = 370;
            MenuWorkshopEditorUI.mapNameField.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.mapNameField.sizeOffset_X     = 200;
            MenuWorkshopEditorUI.mapNameField.sizeOffset_Y     = 30;
            MenuWorkshopEditorUI.mapNameField.maxLength        = 24;
            MenuWorkshopEditorUI.mapNameField.addLabel(local.format("Name_Field_Label"), ESleekSide.LEFT);
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.mapNameField);
            MenuWorkshopEditorUI.mapSizeState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuPlaySingleplayerUI.localization.format("Small")),
                new GUIContent(MenuPlaySingleplayerUI.localization.format("Medium")),
                new GUIContent(MenuPlaySingleplayerUI.localization.format("Large"))
            });
            MenuWorkshopEditorUI.mapSizeState.positionOffset_X = -305;
            MenuWorkshopEditorUI.mapSizeState.positionOffset_Y = 410;
            MenuWorkshopEditorUI.mapSizeState.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.mapSizeState.sizeOffset_X     = 200;
            MenuWorkshopEditorUI.mapSizeState.sizeOffset_Y     = 30;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.mapSizeState);
            MenuWorkshopEditorUI.mapTypeState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuPlaySingleplayerUI.localization.format("Survival")),
                new GUIContent(MenuPlaySingleplayerUI.localization.format("Arena"))
            });
            MenuWorkshopEditorUI.mapTypeState.positionOffset_X = -305;
            MenuWorkshopEditorUI.mapTypeState.positionOffset_Y = 450;
            MenuWorkshopEditorUI.mapTypeState.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.mapTypeState.sizeOffset_X     = 200;
            MenuWorkshopEditorUI.mapTypeState.sizeOffset_Y     = 30;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.mapTypeState);
            MenuWorkshopEditorUI.addButton = new SleekButtonIcon((Texture2D)MenuWorkshopEditorUI.icons.load("Add"));
            MenuWorkshopEditorUI.addButton.positionOffset_X = -305;
            MenuWorkshopEditorUI.addButton.positionOffset_Y = 490;
            MenuWorkshopEditorUI.addButton.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.addButton.sizeOffset_X     = 200;
            MenuWorkshopEditorUI.addButton.sizeOffset_Y     = 30;
            MenuWorkshopEditorUI.addButton.text             = local.format("Add_Button");
            MenuWorkshopEditorUI.addButton.tooltip          = local.format("Add_Button_Tooltip");
            SleekButton sleekButton = MenuWorkshopEditorUI.addButton;

            if (MenuWorkshopEditorUI.< > f__mg$cache1 == null)
            {
                MenuWorkshopEditorUI.< > f__mg$cache1 = new ClickedButton(MenuWorkshopEditorUI.onClickedAddButton);
            }
            sleekButton.onClickedButton = MenuWorkshopEditorUI.< > f__mg$cache1;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.addButton);
            MenuWorkshopEditorUI.removeButton = new SleekButtonIconConfirm((Texture2D)MenuWorkshopEditorUI.icons.load("Remove"), local.format("Remove_Button_Confirm"), local.format("Remove_Button_Confirm_Tooltip"), local.format("Remove_Button_Deny"), local.format("Remove_Button_Deny_Tooltip"));
            MenuWorkshopEditorUI.removeButton.positionOffset_X = -305;
            MenuWorkshopEditorUI.removeButton.positionOffset_Y = 530;
            MenuWorkshopEditorUI.removeButton.positionScale_X  = 0.5f;
            MenuWorkshopEditorUI.removeButton.sizeOffset_X     = 200;
            MenuWorkshopEditorUI.removeButton.sizeOffset_Y     = 30;
            MenuWorkshopEditorUI.removeButton.text             = local.format("Remove_Button");
            MenuWorkshopEditorUI.removeButton.tooltip          = local.format("Remove_Button_Tooltip");
            SleekButtonIconConfirm sleekButtonIconConfirm = MenuWorkshopEditorUI.removeButton;

            if (MenuWorkshopEditorUI.< > f__mg$cache2 == null)
            {
                MenuWorkshopEditorUI.< > f__mg$cache2 = new Confirm(MenuWorkshopEditorUI.onClickedRemoveButton);
            }
            sleekButtonIconConfirm.onConfirmed = MenuWorkshopEditorUI.< > f__mg$cache2;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.removeButton);
            MenuWorkshopEditorUI.editButton = new SleekButtonIcon((Texture2D)MenuWorkshopEditorUI.icons.load("Edit"));
            MenuWorkshopEditorUI.editButton.positionOffset_X         = -305;
            MenuWorkshopEditorUI.editButton.positionOffset_Y         = 290;
            MenuWorkshopEditorUI.editButton.positionScale_X          = 0.5f;
            MenuWorkshopEditorUI.editButton.sizeOffset_X             = 200;
            MenuWorkshopEditorUI.editButton.sizeOffset_Y             = 30;
            MenuWorkshopEditorUI.editButton.text                     = local.format("Edit_Button");
            MenuWorkshopEditorUI.editButton.tooltip                  = local.format("Edit_Button_Tooltip");
            MenuWorkshopEditorUI.editButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton2 = MenuWorkshopEditorUI.editButton;

            if (MenuWorkshopEditorUI.< > f__mg$cache3 == null)
            {
                MenuWorkshopEditorUI.< > f__mg$cache3 = new ClickedButton(MenuWorkshopEditorUI.onClickedEditButton);
            }
            sleekButton2.onClickedButton = MenuWorkshopEditorUI.< > f__mg$cache3;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.editButton);
            MenuWorkshopEditorUI.edit2Button = new SleekButtonIcon((Texture2D)MenuWorkshopEditorUI.icons.load("Edit"));
            MenuWorkshopEditorUI.edit2Button.positionOffset_X         = -305;
            MenuWorkshopEditorUI.edit2Button.positionOffset_Y         = 330;
            MenuWorkshopEditorUI.edit2Button.positionScale_X          = 0.5f;
            MenuWorkshopEditorUI.edit2Button.sizeOffset_X             = 200;
            MenuWorkshopEditorUI.edit2Button.sizeOffset_Y             = 30;
            MenuWorkshopEditorUI.edit2Button.text                     = local.format("Edit2_Button");
            MenuWorkshopEditorUI.edit2Button.tooltip                  = local.format("Edit2_Button_Tooltip");
            MenuWorkshopEditorUI.edit2Button.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton3 = MenuWorkshopEditorUI.edit2Button;

            if (MenuWorkshopEditorUI.< > f__mg$cache4 == null)
            {
                MenuWorkshopEditorUI.< > f__mg$cache4 = new ClickedButton(MenuWorkshopEditorUI.onClickedEdit2Button);
            }
            sleekButton3.onClickedButton = MenuWorkshopEditorUI.< > f__mg$cache4;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.edit2Button);
            MenuWorkshopEditorUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuWorkshopEditorUI.backButton.positionOffset_Y = -50;
            MenuWorkshopEditorUI.backButton.positionScale_Y  = 1f;
            MenuWorkshopEditorUI.backButton.sizeOffset_X     = 200;
            MenuWorkshopEditorUI.backButton.sizeOffset_Y     = 50;
            MenuWorkshopEditorUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuWorkshopEditorUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton4 = MenuWorkshopEditorUI.backButton;

            if (MenuWorkshopEditorUI.< > f__mg$cache5 == null)
            {
                MenuWorkshopEditorUI.< > f__mg$cache5 = new ClickedButton(MenuWorkshopEditorUI.onClickedBackButton);
            }
            sleekButton4.onClickedButton             = MenuWorkshopEditorUI.< > f__mg$cache5;
            MenuWorkshopEditorUI.backButton.fontSize = 14;
            MenuWorkshopEditorUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopEditorUI.container.add(MenuWorkshopEditorUI.backButton);
            MenuWorkshopEditorUI.onLevelsRefreshed();
            Delegate onLevelsRefreshed = Level.onLevelsRefreshed;

            if (MenuWorkshopEditorUI.< > f__mg$cache6 == null)
            {
                MenuWorkshopEditorUI.< > f__mg$cache6 = new LevelsRefreshed(MenuWorkshopEditorUI.onLevelsRefreshed);
            }
            Level.onLevelsRefreshed = (LevelsRefreshed)Delegate.Combine(onLevelsRefreshed, MenuWorkshopEditorUI.< > f__mg$cache6);
        }
        // Token: 0x0600354E RID: 13646 RVA: 0x00163654 File Offset: 0x00161A54
        public EditorLevelPlayersUI()
        {
            Local  local  = Localization.read("/Editor/EditorLevelPlayers.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorLevelPlayers/EditorLevelPlayers.unity3d");

            EditorLevelPlayersUI.container = new Sleek();
            EditorLevelPlayersUI.container.positionOffset_X = 10;
            EditorLevelPlayersUI.container.positionOffset_Y = 10;
            EditorLevelPlayersUI.container.positionScale_X  = 1f;
            EditorLevelPlayersUI.container.sizeOffset_X     = -20;
            EditorLevelPlayersUI.container.sizeOffset_Y     = -20;
            EditorLevelPlayersUI.container.sizeScale_X      = 1f;
            EditorLevelPlayersUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorLevelPlayersUI.container);
            EditorLevelPlayersUI.active    = false;
            EditorLevelPlayersUI.altToggle = new SleekToggle();
            EditorLevelPlayersUI.altToggle.positionOffset_Y = -180;
            EditorLevelPlayersUI.altToggle.positionScale_Y  = 1f;
            EditorLevelPlayersUI.altToggle.sizeOffset_X     = 40;
            EditorLevelPlayersUI.altToggle.sizeOffset_Y     = 40;
            EditorLevelPlayersUI.altToggle.state            = EditorSpawns.selectedAlt;
            EditorLevelPlayersUI.altToggle.addLabel(local.format("AltLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = EditorLevelPlayersUI.altToggle;

            if (EditorLevelPlayersUI.< > f__mg$cache0 == null)
            {
                EditorLevelPlayersUI.< > f__mg$cache0 = new Toggled(EditorLevelPlayersUI.onToggledAltToggle);
            }
            sleekToggle.onToggled = EditorLevelPlayersUI.< > f__mg$cache0;
            EditorLevelPlayersUI.container.add(EditorLevelPlayersUI.altToggle);
            EditorLevelPlayersUI.radiusSlider = new SleekSlider();
            EditorLevelPlayersUI.radiusSlider.positionOffset_Y = -130;
            EditorLevelPlayersUI.radiusSlider.positionScale_Y  = 1f;
            EditorLevelPlayersUI.radiusSlider.sizeOffset_X     = 200;
            EditorLevelPlayersUI.radiusSlider.sizeOffset_Y     = 20;
            EditorLevelPlayersUI.radiusSlider.state            = (float)(EditorSpawns.radius - EditorSpawns.MIN_REMOVE_SIZE) / (float)EditorSpawns.MAX_REMOVE_SIZE;
            EditorLevelPlayersUI.radiusSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorLevelPlayersUI.radiusSlider.addLabel(local.format("RadiusSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider = EditorLevelPlayersUI.radiusSlider;

            if (EditorLevelPlayersUI.< > f__mg$cache1 == null)
            {
                EditorLevelPlayersUI.< > f__mg$cache1 = new Dragged(EditorLevelPlayersUI.onDraggedRadiusSlider);
            }
            sleekSlider.onDragged = EditorLevelPlayersUI.< > f__mg$cache1;
            EditorLevelPlayersUI.container.add(EditorLevelPlayersUI.radiusSlider);
            EditorLevelPlayersUI.rotationSlider = new SleekSlider();
            EditorLevelPlayersUI.rotationSlider.positionOffset_Y = -100;
            EditorLevelPlayersUI.rotationSlider.positionScale_Y  = 1f;
            EditorLevelPlayersUI.rotationSlider.sizeOffset_X     = 200;
            EditorLevelPlayersUI.rotationSlider.sizeOffset_Y     = 20;
            EditorLevelPlayersUI.rotationSlider.state            = EditorSpawns.rotation / 360f;
            EditorLevelPlayersUI.rotationSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorLevelPlayersUI.rotationSlider.addLabel(local.format("RotationSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider2 = EditorLevelPlayersUI.rotationSlider;

            if (EditorLevelPlayersUI.< > f__mg$cache2 == null)
            {
                EditorLevelPlayersUI.< > f__mg$cache2 = new Dragged(EditorLevelPlayersUI.onDraggedRotationSlider);
            }
            sleekSlider2.onDragged = EditorLevelPlayersUI.< > f__mg$cache2;
            EditorLevelPlayersUI.container.add(EditorLevelPlayersUI.rotationSlider);
            EditorLevelPlayersUI.addButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorLevelPlayersUI.addButton.positionOffset_Y = -70;
            EditorLevelPlayersUI.addButton.positionScale_Y  = 1f;
            EditorLevelPlayersUI.addButton.sizeOffset_X     = 200;
            EditorLevelPlayersUI.addButton.sizeOffset_Y     = 30;
            EditorLevelPlayersUI.addButton.text             = local.format("AddButtonText", new object[]
            {
                ControlsSettings.tool_0
            });
            EditorLevelPlayersUI.addButton.tooltip = local.format("AddButtonTooltip");
            SleekButton sleekButton = EditorLevelPlayersUI.addButton;

            if (EditorLevelPlayersUI.< > f__mg$cache3 == null)
            {
                EditorLevelPlayersUI.< > f__mg$cache3 = new ClickedButton(EditorLevelPlayersUI.onClickedAddButton);
            }
            sleekButton.onClickedButton = EditorLevelPlayersUI.< > f__mg$cache3;
            EditorLevelPlayersUI.container.add(EditorLevelPlayersUI.addButton);
            EditorLevelPlayersUI.removeButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorLevelPlayersUI.removeButton.positionOffset_Y = -30;
            EditorLevelPlayersUI.removeButton.positionScale_Y  = 1f;
            EditorLevelPlayersUI.removeButton.sizeOffset_X     = 200;
            EditorLevelPlayersUI.removeButton.sizeOffset_Y     = 30;
            EditorLevelPlayersUI.removeButton.text             = local.format("RemoveButtonText", new object[]
            {
                ControlsSettings.tool_1
            });
            EditorLevelPlayersUI.removeButton.tooltip = local.format("RemoveButtonTooltip");
            SleekButton sleekButton2 = EditorLevelPlayersUI.removeButton;

            if (EditorLevelPlayersUI.< > f__mg$cache4 == null)
            {
                EditorLevelPlayersUI.< > f__mg$cache4 = new ClickedButton(EditorLevelPlayersUI.onClickedRemoveButton);
            }
            sleekButton2.onClickedButton = EditorLevelPlayersUI.< > f__mg$cache4;
            EditorLevelPlayersUI.container.add(EditorLevelPlayersUI.removeButton);
            bundle.unload();
        }
Example #10
0
        // Token: 0x060034B5 RID: 13493 RVA: 0x0015AD6C File Offset: 0x0015916C
        public EditorEnvironmentNavigationUI()
        {
            Local  local  = Localization.read("/Editor/EditorEnvironmentNavigation.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorEnvironmentNavigation/EditorEnvironmentNavigation.unity3d");

            EditorEnvironmentNavigationUI.container = new Sleek();
            EditorEnvironmentNavigationUI.container.positionOffset_X = 10;
            EditorEnvironmentNavigationUI.container.positionOffset_Y = 10;
            EditorEnvironmentNavigationUI.container.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.container.sizeOffset_X     = -20;
            EditorEnvironmentNavigationUI.container.sizeOffset_Y     = -20;
            EditorEnvironmentNavigationUI.container.sizeScale_X      = 1f;
            EditorEnvironmentNavigationUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorEnvironmentNavigationUI.container);
            EditorEnvironmentNavigationUI.active      = false;
            EditorEnvironmentNavigationUI.widthSlider = new SleekSlider();
            EditorEnvironmentNavigationUI.widthSlider.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.widthSlider.positionOffset_Y = 80;
            EditorEnvironmentNavigationUI.widthSlider.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.widthSlider.sizeOffset_X     = 200;
            EditorEnvironmentNavigationUI.widthSlider.sizeOffset_Y     = 20;
            EditorEnvironmentNavigationUI.widthSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentNavigationUI.widthSlider.addLabel(local.format("Width_Label"), ESleekSide.LEFT);
            SleekSlider sleekSlider = EditorEnvironmentNavigationUI.widthSlider;

            if (EditorEnvironmentNavigationUI.< > f__mg$cache0 == null)
            {
                EditorEnvironmentNavigationUI.< > f__mg$cache0 = new Dragged(EditorEnvironmentNavigationUI.onDraggedWidthSlider);
            }
            sleekSlider.onDragged = EditorEnvironmentNavigationUI.< > f__mg$cache0;
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.widthSlider);
            EditorEnvironmentNavigationUI.widthSlider.isVisible         = false;
            EditorEnvironmentNavigationUI.heightSlider                  = new SleekSlider();
            EditorEnvironmentNavigationUI.heightSlider.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.heightSlider.positionOffset_Y = 110;
            EditorEnvironmentNavigationUI.heightSlider.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.heightSlider.sizeOffset_X     = 200;
            EditorEnvironmentNavigationUI.heightSlider.sizeOffset_Y     = 20;
            EditorEnvironmentNavigationUI.heightSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorEnvironmentNavigationUI.heightSlider.addLabel(local.format("Height_Label"), ESleekSide.LEFT);
            SleekSlider sleekSlider2 = EditorEnvironmentNavigationUI.heightSlider;

            if (EditorEnvironmentNavigationUI.< > f__mg$cache1 == null)
            {
                EditorEnvironmentNavigationUI.< > f__mg$cache1 = new Dragged(EditorEnvironmentNavigationUI.onDraggedHeightSlider);
            }
            sleekSlider2.onDragged = EditorEnvironmentNavigationUI.< > f__mg$cache1;
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.heightSlider);
            EditorEnvironmentNavigationUI.heightSlider.isVisible = false;
            EditorEnvironmentNavigationUI.navBox = new SleekBox();
            EditorEnvironmentNavigationUI.navBox.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.navBox.positionOffset_Y = 140;
            EditorEnvironmentNavigationUI.navBox.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.navBox.sizeOffset_X     = 200;
            EditorEnvironmentNavigationUI.navBox.sizeOffset_Y     = 30;
            EditorEnvironmentNavigationUI.navBox.addLabel(local.format("Nav_Label"), ESleekSide.LEFT);
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.navBox);
            EditorEnvironmentNavigationUI.navBox.isVisible    = false;
            EditorEnvironmentNavigationUI.difficultyGUIDField = new SleekField();
            EditorEnvironmentNavigationUI.difficultyGUIDField.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.difficultyGUIDField.positionOffset_Y = 180;
            EditorEnvironmentNavigationUI.difficultyGUIDField.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.difficultyGUIDField.sizeOffset_X     = 200;
            EditorEnvironmentNavigationUI.difficultyGUIDField.sizeOffset_Y     = 30;
            EditorEnvironmentNavigationUI.difficultyGUIDField.maxLength        = 32;
            SleekField sleekField = EditorEnvironmentNavigationUI.difficultyGUIDField;

            if (EditorEnvironmentNavigationUI.< > f__mg$cache2 == null)
            {
                EditorEnvironmentNavigationUI.< > f__mg$cache2 = new Typed(EditorEnvironmentNavigationUI.onDifficultyGUIDFieldTyped);
            }
            sleekField.onTyped = EditorEnvironmentNavigationUI.< > f__mg$cache2;
            EditorEnvironmentNavigationUI.difficultyGUIDField.addLabel(local.format("Difficulty_GUID_Field_Label"), ESleekSide.LEFT);
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.difficultyGUIDField);
            EditorEnvironmentNavigationUI.difficultyGUIDField.isVisible = false;
            EditorEnvironmentNavigationUI.maxZombiesField = new SleekByteField();
            EditorEnvironmentNavigationUI.maxZombiesField.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.maxZombiesField.positionOffset_Y = 220;
            EditorEnvironmentNavigationUI.maxZombiesField.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.maxZombiesField.sizeOffset_X     = 200;
            EditorEnvironmentNavigationUI.maxZombiesField.sizeOffset_Y     = 30;
            SleekByteField sleekByteField = EditorEnvironmentNavigationUI.maxZombiesField;

            if (EditorEnvironmentNavigationUI.< > f__mg$cache3 == null)
            {
                EditorEnvironmentNavigationUI.< > f__mg$cache3 = new TypedByte(EditorEnvironmentNavigationUI.onMaxZombiesFieldTyped);
            }
            sleekByteField.onTypedByte = EditorEnvironmentNavigationUI.< > f__mg$cache3;
            EditorEnvironmentNavigationUI.maxZombiesField.addLabel(local.format("Max_Zombies_Field_Label"), ESleekSide.LEFT);
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.maxZombiesField);
            EditorEnvironmentNavigationUI.maxZombiesField.isVisible           = false;
            EditorEnvironmentNavigationUI.spawnZombiesToggle                  = new SleekToggle();
            EditorEnvironmentNavigationUI.spawnZombiesToggle.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.spawnZombiesToggle.positionOffset_Y = 260;
            EditorEnvironmentNavigationUI.spawnZombiesToggle.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.spawnZombiesToggle.sizeOffset_X     = 40;
            EditorEnvironmentNavigationUI.spawnZombiesToggle.sizeOffset_Y     = 40;
            SleekToggle sleekToggle = EditorEnvironmentNavigationUI.spawnZombiesToggle;

            if (EditorEnvironmentNavigationUI.< > f__mg$cache4 == null)
            {
                EditorEnvironmentNavigationUI.< > f__mg$cache4 = new Toggled(EditorEnvironmentNavigationUI.onToggledSpawnZombiesToggle);
            }
            sleekToggle.onToggled = EditorEnvironmentNavigationUI.< > f__mg$cache4;
            EditorEnvironmentNavigationUI.spawnZombiesToggle.addLabel(local.format("Spawn_Zombies_Toggle_Label"), ESleekSide.RIGHT);
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.spawnZombiesToggle);
            EditorEnvironmentNavigationUI.spawnZombiesToggle.isVisible          = false;
            EditorEnvironmentNavigationUI.bakeNavigationButton                  = new SleekButtonIcon((Texture2D)bundle.load("Navigation"));
            EditorEnvironmentNavigationUI.bakeNavigationButton.positionOffset_X = -200;
            EditorEnvironmentNavigationUI.bakeNavigationButton.positionOffset_Y = -30;
            EditorEnvironmentNavigationUI.bakeNavigationButton.positionScale_X  = 1f;
            EditorEnvironmentNavigationUI.bakeNavigationButton.positionScale_Y  = 1f;
            EditorEnvironmentNavigationUI.bakeNavigationButton.sizeOffset_X     = 200;
            EditorEnvironmentNavigationUI.bakeNavigationButton.sizeOffset_Y     = 30;
            EditorEnvironmentNavigationUI.bakeNavigationButton.text             = local.format("Bake_Navigation");
            EditorEnvironmentNavigationUI.bakeNavigationButton.tooltip          = local.format("Bake_Navigation_Tooltip");
            SleekButton sleekButton = EditorEnvironmentNavigationUI.bakeNavigationButton;

            if (EditorEnvironmentNavigationUI.< > f__mg$cache5 == null)
            {
                EditorEnvironmentNavigationUI.< > f__mg$cache5 = new ClickedButton(EditorEnvironmentNavigationUI.onClickedBakeNavigationButton);
            }
            sleekButton.onClickedButton = EditorEnvironmentNavigationUI.< > f__mg$cache5;
            EditorEnvironmentNavigationUI.container.add(EditorEnvironmentNavigationUI.bakeNavigationButton);
            EditorEnvironmentNavigationUI.bakeNavigationButton.isVisible = false;
            bundle.unload();
        }
Example #11
0
        // Token: 0x0600358E RID: 13710 RVA: 0x001674AC File Offset: 0x001658AC
        public EditorTerrainDetailsUI()
        {
            Local  local  = Localization.read("/Editor/EditorTerrainDetails.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrainDetails/EditorTerrainDetails.unity3d");

            EditorTerrainDetailsUI.container = new Sleek();
            EditorTerrainDetailsUI.container.positionOffset_X = 10;
            EditorTerrainDetailsUI.container.positionOffset_Y = 10;
            EditorTerrainDetailsUI.container.positionScale_X  = 1f;
            EditorTerrainDetailsUI.container.sizeOffset_X     = -20;
            EditorTerrainDetailsUI.container.sizeOffset_Y     = -20;
            EditorTerrainDetailsUI.container.sizeScale_X      = 1f;
            EditorTerrainDetailsUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorTerrainDetailsUI.container);
            EditorTerrainDetailsUI.active = false;
            if (LevelGround.details == null)
            {
                return;
            }
            EditorTerrainDetailsUI.detailsScrollBox = new SleekScrollBox();
            EditorTerrainDetailsUI.detailsScrollBox.positionOffset_Y = 120;
            EditorTerrainDetailsUI.detailsScrollBox.positionOffset_X = -400;
            EditorTerrainDetailsUI.detailsScrollBox.positionScale_X  = 1f;
            EditorTerrainDetailsUI.detailsScrollBox.sizeOffset_X     = 400;
            EditorTerrainDetailsUI.detailsScrollBox.sizeOffset_Y     = -160;
            EditorTerrainDetailsUI.detailsScrollBox.sizeScale_Y      = 1f;
            EditorTerrainDetailsUI.detailsScrollBox.area             = new Rect(0f, 0f, 5f, (float)(LevelGround.details.Length * 70 + 400));
            EditorTerrainDetailsUI.container.add(EditorTerrainDetailsUI.detailsScrollBox);
            for (int i = 0; i < LevelGround.details.Length; i++)
            {
                GroundDetail      groundDetail      = LevelGround.details[i];
                SleekImageTexture sleekImageTexture = new SleekImageTexture();
                sleekImageTexture.positionOffset_X = 200;
                sleekImageTexture.positionOffset_Y = i * 70;
                sleekImageTexture.sizeOffset_X     = 64;
                sleekImageTexture.sizeOffset_Y     = 64;
                sleekImageTexture.texture          = groundDetail.prototype.prototypeTexture;
                EditorTerrainDetailsUI.detailsScrollBox.add(sleekImageTexture);
                SleekButton sleekButton = new SleekButton();
                sleekButton.sizeOffset_Y = 64;
                if (groundDetail.prototype.prototypeTexture != null)
                {
                    sleekButton.positionOffset_X = 70;
                    sleekButton.sizeOffset_X     = 100;
                    sleekButton.text             = LevelGround.details[i].prototype.prototypeTexture.name;
                }
                else
                {
                    sleekButton.sizeOffset_X = 170;
                    sleekButton.text         = LevelGround.details[i].prototype.prototype.name;
                }
                SleekButton sleekButton2 = sleekButton;
                if (EditorTerrainDetailsUI.< > f__mg$cache0 == null)
                {
                    EditorTerrainDetailsUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainDetailsUI.onClickedDetailButton);
                }
                sleekButton2.onClickedButton = EditorTerrainDetailsUI.< > f__mg$cache0;
                sleekImageTexture.add(sleekButton);
            }
            EditorTerrainDetailsUI.densitySlider = new SleekSlider();
            EditorTerrainDetailsUI.densitySlider.positionOffset_X = 200;
            EditorTerrainDetailsUI.densitySlider.positionOffset_Y = LevelGround.details.Length * 70;
            EditorTerrainDetailsUI.densitySlider.sizeOffset_X     = 170;
            EditorTerrainDetailsUI.densitySlider.sizeOffset_Y     = 20;
            EditorTerrainDetailsUI.densitySlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainDetailsUI.densitySlider.addLabel(local.format("DensitySliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider = EditorTerrainDetailsUI.densitySlider;

            if (EditorTerrainDetailsUI.< > f__mg$cache1 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache1 = new Dragged(EditorTerrainDetailsUI.onDraggedDensitySlider);
            }
            sleekSlider.onDragged = EditorTerrainDetailsUI.< > f__mg$cache1;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.densitySlider);
            EditorTerrainDetailsUI.chanceSlider = new SleekSlider();
            EditorTerrainDetailsUI.chanceSlider.positionOffset_X = 200;
            EditorTerrainDetailsUI.chanceSlider.positionOffset_Y = LevelGround.details.Length * 70 + 30;
            EditorTerrainDetailsUI.chanceSlider.sizeOffset_X     = 170;
            EditorTerrainDetailsUI.chanceSlider.sizeOffset_Y     = 20;
            EditorTerrainDetailsUI.chanceSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainDetailsUI.chanceSlider.addLabel(local.format("ChanceSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider2 = EditorTerrainDetailsUI.chanceSlider;

            if (EditorTerrainDetailsUI.< > f__mg$cache2 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache2 = new Dragged(EditorTerrainDetailsUI.onDraggedChanceSlider);
            }
            sleekSlider2.onDragged = EditorTerrainDetailsUI.< > f__mg$cache2;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.chanceSlider);
            EditorTerrainDetailsUI.grass_0_Toggle = new SleekToggle();
            EditorTerrainDetailsUI.grass_0_Toggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.grass_0_Toggle.positionOffset_Y = LevelGround.details.Length * 70 + 60;
            EditorTerrainDetailsUI.grass_0_Toggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.grass_0_Toggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.grass_0_Toggle.addLabel(local.format("Grass_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = EditorTerrainDetailsUI.grass_0_Toggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache3 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache3 = new Toggled(EditorTerrainDetailsUI.onToggledGrass_0_Toggle);
            }
            sleekToggle.onToggled = EditorTerrainDetailsUI.< > f__mg$cache3;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.grass_0_Toggle);
            EditorTerrainDetailsUI.grass_1_Toggle = new SleekToggle();
            EditorTerrainDetailsUI.grass_1_Toggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.grass_1_Toggle.positionOffset_Y = LevelGround.details.Length * 70 + 110;
            EditorTerrainDetailsUI.grass_1_Toggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.grass_1_Toggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.grass_1_Toggle.addLabel(local.format("Grass_1_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = EditorTerrainDetailsUI.grass_1_Toggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache4 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache4 = new Toggled(EditorTerrainDetailsUI.onToggledGrass_1_Toggle);
            }
            sleekToggle2.onToggled = EditorTerrainDetailsUI.< > f__mg$cache4;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.grass_1_Toggle);
            EditorTerrainDetailsUI.flower_0_Toggle = new SleekToggle();
            EditorTerrainDetailsUI.flower_0_Toggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.flower_0_Toggle.positionOffset_Y = LevelGround.details.Length * 70 + 160;
            EditorTerrainDetailsUI.flower_0_Toggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.flower_0_Toggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.flower_0_Toggle.addLabel(local.format("Flower_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle3 = EditorTerrainDetailsUI.flower_0_Toggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache5 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache5 = new Toggled(EditorTerrainDetailsUI.onToggledFlower_0_Toggle);
            }
            sleekToggle3.onToggled = EditorTerrainDetailsUI.< > f__mg$cache5;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.flower_0_Toggle);
            EditorTerrainDetailsUI.flower_1_Toggle = new SleekToggle();
            EditorTerrainDetailsUI.flower_1_Toggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.flower_1_Toggle.positionOffset_Y = LevelGround.details.Length * 70 + 210;
            EditorTerrainDetailsUI.flower_1_Toggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.flower_1_Toggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.flower_1_Toggle.addLabel(local.format("Flower_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle4 = EditorTerrainDetailsUI.flower_1_Toggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache6 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache6 = new Toggled(EditorTerrainDetailsUI.onToggledFlower_1_Toggle);
            }
            sleekToggle4.onToggled = EditorTerrainDetailsUI.< > f__mg$cache6;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.flower_1_Toggle);
            EditorTerrainDetailsUI.rockToggle = new SleekToggle();
            EditorTerrainDetailsUI.rockToggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.rockToggle.positionOffset_Y = LevelGround.details.Length * 70 + 260;
            EditorTerrainDetailsUI.rockToggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.rockToggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.rockToggle.addLabel(local.format("RockToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle5 = EditorTerrainDetailsUI.rockToggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache7 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache7 = new Toggled(EditorTerrainDetailsUI.onToggledRockToggle);
            }
            sleekToggle5.onToggled = EditorTerrainDetailsUI.< > f__mg$cache7;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.rockToggle);
            EditorTerrainDetailsUI.roadToggle = new SleekToggle();
            EditorTerrainDetailsUI.roadToggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.roadToggle.positionOffset_Y = LevelGround.details.Length * 70 + 310;
            EditorTerrainDetailsUI.roadToggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.roadToggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.roadToggle.addLabel(local.format("RoadToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle6 = EditorTerrainDetailsUI.roadToggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache8 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache8 = new Toggled(EditorTerrainDetailsUI.onToggledRoadToggle);
            }
            sleekToggle6.onToggled = EditorTerrainDetailsUI.< > f__mg$cache8;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.roadToggle);
            EditorTerrainDetailsUI.snowToggle = new SleekToggle();
            EditorTerrainDetailsUI.snowToggle.positionOffset_X = 200;
            EditorTerrainDetailsUI.snowToggle.positionOffset_Y = LevelGround.details.Length * 70 + 360;
            EditorTerrainDetailsUI.snowToggle.sizeOffset_X     = 40;
            EditorTerrainDetailsUI.snowToggle.sizeOffset_Y     = 40;
            EditorTerrainDetailsUI.snowToggle.addLabel(local.format("SnowToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle7 = EditorTerrainDetailsUI.snowToggle;

            if (EditorTerrainDetailsUI.< > f__mg$cache9 == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cache9 = new Toggled(EditorTerrainDetailsUI.onToggledSnowToggle);
            }
            sleekToggle7.onToggled = EditorTerrainDetailsUI.< > f__mg$cache9;
            EditorTerrainDetailsUI.detailsScrollBox.add(EditorTerrainDetailsUI.snowToggle);
            EditorTerrainDetailsUI.selectedBox = new SleekBox();
            EditorTerrainDetailsUI.selectedBox.positionOffset_X = -200;
            EditorTerrainDetailsUI.selectedBox.positionOffset_Y = 80;
            EditorTerrainDetailsUI.selectedBox.positionScale_X  = 1f;
            EditorTerrainDetailsUI.selectedBox.sizeOffset_X     = 200;
            EditorTerrainDetailsUI.selectedBox.sizeOffset_Y     = 30;
            EditorTerrainDetailsUI.selectedBox.addLabel(local.format("SelectionBoxLabelText"), ESleekSide.LEFT);
            EditorTerrainDetailsUI.container.add(EditorTerrainDetailsUI.selectedBox);
            EditorTerrainDetailsUI.updateSelection();
            EditorTerrainDetailsUI.bakeDetailsButton = new SleekButtonIcon((Texture2D)bundle.load("Details"));
            EditorTerrainDetailsUI.bakeDetailsButton.positionOffset_X = -200;
            EditorTerrainDetailsUI.bakeDetailsButton.positionOffset_Y = -30;
            EditorTerrainDetailsUI.bakeDetailsButton.positionScale_X  = 1f;
            EditorTerrainDetailsUI.bakeDetailsButton.positionScale_Y  = 1f;
            EditorTerrainDetailsUI.bakeDetailsButton.sizeOffset_X     = 200;
            EditorTerrainDetailsUI.bakeDetailsButton.sizeOffset_Y     = 30;
            EditorTerrainDetailsUI.bakeDetailsButton.text             = local.format("BakeDetailsButtonText");
            EditorTerrainDetailsUI.bakeDetailsButton.tooltip          = local.format("BakeDetailsButtonTooltip");
            SleekButton sleekButton3 = EditorTerrainDetailsUI.bakeDetailsButton;

            if (EditorTerrainDetailsUI.< > f__mg$cacheA == null)
            {
                EditorTerrainDetailsUI.< > f__mg$cacheA = new ClickedButton(EditorTerrainDetailsUI.onClickedBakeDetailsButton);
            }
            sleekButton3.onClickedButton = EditorTerrainDetailsUI.< > f__mg$cacheA;
            EditorTerrainDetailsUI.container.add(EditorTerrainDetailsUI.bakeDetailsButton);
            bundle.unload();
        }
        // Token: 0x06003503 RID: 13571 RVA: 0x0015ECC8 File Offset: 0x0015D0C8
        public EditorLevelUI()
        {
            Local  local  = Localization.read("/Editor/EditorLevel.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorLevel/EditorLevel.unity3d");

            EditorLevelUI.container = new Sleek();
            EditorLevelUI.container.positionOffset_X = 10;
            EditorLevelUI.container.positionOffset_Y = 10;
            EditorLevelUI.container.positionScale_X  = 1f;
            EditorLevelUI.container.sizeOffset_X     = -20;
            EditorLevelUI.container.sizeOffset_Y     = -20;
            EditorLevelUI.container.sizeScale_X      = 1f;
            EditorLevelUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorLevelUI.container);
            EditorLevelUI.active        = false;
            EditorLevelUI.objectsButton = new SleekButtonIcon((Texture2D)bundle.load("Objects"));
            EditorLevelUI.objectsButton.positionOffset_Y = 40;
            EditorLevelUI.objectsButton.sizeOffset_X     = -5;
            EditorLevelUI.objectsButton.sizeOffset_Y     = 30;
            EditorLevelUI.objectsButton.sizeScale_X      = 0.25f;
            EditorLevelUI.objectsButton.text             = local.format("ObjectsButtonText");
            EditorLevelUI.objectsButton.tooltip          = local.format("ObjectsButtonTooltip");
            SleekButton sleekButton = EditorLevelUI.objectsButton;

            if (EditorLevelUI.< > f__mg$cache0 == null)
            {
                EditorLevelUI.< > f__mg$cache0 = new ClickedButton(EditorLevelUI.onClickedObjectsButton);
            }
            sleekButton.onClickedButton = EditorLevelUI.< > f__mg$cache0;
            EditorLevelUI.container.add(EditorLevelUI.objectsButton);
            EditorLevelUI.visibilityButton = new SleekButtonIcon((Texture2D)bundle.load("Visibility"));
            EditorLevelUI.visibilityButton.positionOffset_X = 5;
            EditorLevelUI.visibilityButton.positionOffset_Y = 40;
            EditorLevelUI.visibilityButton.positionScale_X  = 0.25f;
            EditorLevelUI.visibilityButton.sizeOffset_X     = -10;
            EditorLevelUI.visibilityButton.sizeOffset_Y     = 30;
            EditorLevelUI.visibilityButton.sizeScale_X      = 0.25f;
            EditorLevelUI.visibilityButton.text             = local.format("VisibilityButtonText");
            EditorLevelUI.visibilityButton.tooltip          = local.format("VisibilityButtonTooltip");
            SleekButton sleekButton2 = EditorLevelUI.visibilityButton;

            if (EditorLevelUI.< > f__mg$cache1 == null)
            {
                EditorLevelUI.< > f__mg$cache1 = new ClickedButton(EditorLevelUI.onClickedVisibilityButton);
            }
            sleekButton2.onClickedButton = EditorLevelUI.< > f__mg$cache1;
            EditorLevelUI.container.add(EditorLevelUI.visibilityButton);
            EditorLevelUI.playersButton = new SleekButtonIcon((Texture2D)bundle.load("Players"));
            EditorLevelUI.playersButton.positionOffset_Y = 40;
            EditorLevelUI.playersButton.positionOffset_X = 5;
            EditorLevelUI.playersButton.positionScale_X  = 0.5f;
            EditorLevelUI.playersButton.sizeOffset_X     = -10;
            EditorLevelUI.playersButton.sizeOffset_Y     = 30;
            EditorLevelUI.playersButton.sizeScale_X      = 0.25f;
            EditorLevelUI.playersButton.text             = local.format("PlayersButtonText");
            EditorLevelUI.playersButton.tooltip          = local.format("PlayersButtonTooltip");
            SleekButton sleekButton3 = EditorLevelUI.playersButton;

            if (EditorLevelUI.< > f__mg$cache2 == null)
            {
                EditorLevelUI.< > f__mg$cache2 = new ClickedButton(EditorLevelUI.onClickedPlayersButton);
            }
            sleekButton3.onClickedButton = EditorLevelUI.< > f__mg$cache2;
            EditorLevelUI.container.add(EditorLevelUI.playersButton);
            bundle.unload();
            new EditorLevelObjectsUI();
            new EditorLevelVisibilityUI();
            new EditorLevelPlayersUI();
        }
Example #13
0
        public MenuSurvivorsClothingBoxUI()
        {
            MenuSurvivorsClothingBoxUI.localization = Localization.read("/Menu/Survivors/MenuSurvivorsClothingBox.dat");
            if (MenuSurvivorsClothingBoxUI.icons != null)
            {
                MenuSurvivorsClothingBoxUI.icons.unload();
            }
            MenuSurvivorsClothingBoxUI.icons     = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Survivors/MenuSurvivorsClothingBox/MenuSurvivorsClothingBox.unity3d");
            MenuSurvivorsClothingBoxUI.container = new Sleek();
            MenuSurvivorsClothingBoxUI.container.positionOffset_X = 10;
            MenuSurvivorsClothingBoxUI.container.positionOffset_Y = 10;
            MenuSurvivorsClothingBoxUI.container.positionScale_Y  = 1f;
            MenuSurvivorsClothingBoxUI.container.sizeOffset_X     = -20;
            MenuSurvivorsClothingBoxUI.container.sizeOffset_Y     = -20;
            MenuSurvivorsClothingBoxUI.container.sizeScale_X      = 1f;
            MenuSurvivorsClothingBoxUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuSurvivorsClothingBoxUI.container);
            MenuSurvivorsClothingBoxUI.active    = false;
            MenuSurvivorsClothingBoxUI.inventory = new Sleek();
            MenuSurvivorsClothingBoxUI.inventory.positionScale_X  = 0.5f;
            MenuSurvivorsClothingBoxUI.inventory.positionOffset_Y = 10;
            MenuSurvivorsClothingBoxUI.inventory.sizeScale_X      = 0.5f;
            MenuSurvivorsClothingBoxUI.inventory.sizeScale_Y      = 1f;
            MenuSurvivorsClothingBoxUI.inventory.sizeOffset_Y     = -20;
            MenuSurvivorsClothingBoxUI.inventory.constraint       = ESleekConstraint.XY;
            MenuSurvivorsClothingBoxUI.container.add(MenuSurvivorsClothingBoxUI.inventory);
            MenuSurvivorsClothingBoxUI.finalBox = new SleekBox();
            MenuSurvivorsClothingBoxUI.finalBox.positionOffset_X = -10;
            MenuSurvivorsClothingBoxUI.finalBox.positionOffset_Y = -10;
            MenuSurvivorsClothingBoxUI.finalBox.sizeOffset_X     = 20;
            MenuSurvivorsClothingBoxUI.finalBox.sizeOffset_Y     = 20;
            MenuSurvivorsClothingBoxUI.inventory.add(MenuSurvivorsClothingBoxUI.finalBox);
            MenuSurvivorsClothingBoxUI.boxButton = new SleekInventory();
            MenuSurvivorsClothingBoxUI.boxButton.positionOffset_Y = -30;
            MenuSurvivorsClothingBoxUI.boxButton.positionScale_X  = 0.3f;
            MenuSurvivorsClothingBoxUI.boxButton.positionScale_Y  = 0.3f;
            MenuSurvivorsClothingBoxUI.boxButton.sizeScale_X      = 0.4f;
            MenuSurvivorsClothingBoxUI.boxButton.sizeScale_Y      = 0.4f;
            MenuSurvivorsClothingBoxUI.inventory.add(MenuSurvivorsClothingBoxUI.boxButton);
            MenuSurvivorsClothingBoxUI.keyButton = new SleekButtonIcon(null, 40);
            MenuSurvivorsClothingBoxUI.keyButton.positionOffset_Y = -20;
            MenuSurvivorsClothingBoxUI.keyButton.positionScale_X  = 0.3f;
            MenuSurvivorsClothingBoxUI.keyButton.positionScale_Y  = 0.7f;
            MenuSurvivorsClothingBoxUI.keyButton.sizeOffset_X     = -5;
            MenuSurvivorsClothingBoxUI.keyButton.sizeOffset_Y     = 50;
            MenuSurvivorsClothingBoxUI.keyButton.sizeScale_X      = 0.2f;
            MenuSurvivorsClothingBoxUI.keyButton.text             = MenuSurvivorsClothingBoxUI.localization.format("Key_Text");
            MenuSurvivorsClothingBoxUI.keyButton.tooltip          = MenuSurvivorsClothingBoxUI.localization.format("Key_Tooltip");
            SleekButton sleekButton = MenuSurvivorsClothingBoxUI.keyButton;

            if (MenuSurvivorsClothingBoxUI.< > f__mg$cache0 == null)
            {
                MenuSurvivorsClothingBoxUI.< > f__mg$cache0 = new ClickedButton(MenuSurvivorsClothingBoxUI.onClickedKeyButton);
            }
            sleekButton.onClickedButton = MenuSurvivorsClothingBoxUI.< > f__mg$cache0;
            MenuSurvivorsClothingBoxUI.keyButton.fontSize = 14;
            MenuSurvivorsClothingBoxUI.inventory.add(MenuSurvivorsClothingBoxUI.keyButton);
            MenuSurvivorsClothingBoxUI.keyButton.isVisible          = false;
            MenuSurvivorsClothingBoxUI.unboxButton                  = new SleekButtonIcon(null);
            MenuSurvivorsClothingBoxUI.unboxButton.positionOffset_X = 5;
            MenuSurvivorsClothingBoxUI.unboxButton.positionOffset_Y = -20;
            MenuSurvivorsClothingBoxUI.unboxButton.positionScale_X  = 0.5f;
            MenuSurvivorsClothingBoxUI.unboxButton.positionScale_Y  = 0.7f;
            MenuSurvivorsClothingBoxUI.unboxButton.sizeOffset_X     = -5;
            MenuSurvivorsClothingBoxUI.unboxButton.sizeOffset_Y     = 50;
            MenuSurvivorsClothingBoxUI.unboxButton.sizeScale_X      = 0.2f;
            MenuSurvivorsClothingBoxUI.unboxButton.text             = MenuSurvivorsClothingBoxUI.localization.format("Unbox_Text");
            MenuSurvivorsClothingBoxUI.unboxButton.tooltip          = MenuSurvivorsClothingBoxUI.localization.format("Unbox_Tooltip");
            SleekButton sleekButton2 = MenuSurvivorsClothingBoxUI.unboxButton;

            if (MenuSurvivorsClothingBoxUI.< > f__mg$cache1 == null)
            {
                MenuSurvivorsClothingBoxUI.< > f__mg$cache1 = new ClickedButton(MenuSurvivorsClothingBoxUI.onClickedUnboxButton);
            }
            sleekButton2.onClickedButton = MenuSurvivorsClothingBoxUI.< > f__mg$cache1;
            MenuSurvivorsClothingBoxUI.unboxButton.fontSize = 14;
            MenuSurvivorsClothingBoxUI.inventory.add(MenuSurvivorsClothingBoxUI.unboxButton);
            MenuSurvivorsClothingBoxUI.unboxButton.isVisible = false;
            if (!MenuSurvivorsClothingBoxUI.hasLoaded)
            {
                TempSteamworksEconomy economyService = Provider.provider.economyService;
                Delegate onInventoryExchanged        = economyService.onInventoryExchanged;
                if (MenuSurvivorsClothingBoxUI.< > f__mg$cache2 == null)
                {
                    MenuSurvivorsClothingBoxUI.< > f__mg$cache2 = new TempSteamworksEconomy.InventoryExchanged(MenuSurvivorsClothingBoxUI.onInventoryExchanged);
                }
                economyService.onInventoryExchanged = (TempSteamworksEconomy.InventoryExchanged)Delegate.Combine(onInventoryExchanged, MenuSurvivorsClothingBoxUI.< > f__mg$cache2);
            }
            MenuSurvivorsClothingBoxUI.hasLoaded  = true;
            MenuSurvivorsClothingBoxUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuSurvivorsClothingBoxUI.backButton.positionOffset_Y = -50;
            MenuSurvivorsClothingBoxUI.backButton.positionScale_Y  = 1f;
            MenuSurvivorsClothingBoxUI.backButton.sizeOffset_X     = 200;
            MenuSurvivorsClothingBoxUI.backButton.sizeOffset_Y     = 50;
            MenuSurvivorsClothingBoxUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuSurvivorsClothingBoxUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton3 = MenuSurvivorsClothingBoxUI.backButton;

            if (MenuSurvivorsClothingBoxUI.< > f__mg$cache3 == null)
            {
                MenuSurvivorsClothingBoxUI.< > f__mg$cache3 = new ClickedButton(MenuSurvivorsClothingBoxUI.onClickedBackButton);
            }
            sleekButton3.onClickedButton = MenuSurvivorsClothingBoxUI.< > f__mg$cache3;
            MenuSurvivorsClothingBoxUI.backButton.fontSize = 14;
            MenuSurvivorsClothingBoxUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuSurvivorsClothingBoxUI.container.add(MenuSurvivorsClothingBoxUI.backButton);
        }
        // Token: 0x060038D4 RID: 14548 RVA: 0x0019FED4 File Offset: 0x0019E2D4
        public PlayerNPCQuestUI()
        {
            if (PlayerNPCQuestUI.icons != null)
            {
                PlayerNPCQuestUI.icons.unload();
            }
            PlayerNPCQuestUI.localization = Localization.read("/Player/PlayerNPCQuest.dat");
            PlayerNPCQuestUI.icons        = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerNPCQuest/PlayerNPCQuest.unity3d");
            PlayerNPCQuestUI.container    = new Sleek();
            PlayerNPCQuestUI.container.positionScale_Y  = 1f;
            PlayerNPCQuestUI.container.positionOffset_X = 10;
            PlayerNPCQuestUI.container.positionOffset_Y = 10;
            PlayerNPCQuestUI.container.sizeOffset_X     = -20;
            PlayerNPCQuestUI.container.sizeOffset_Y     = -20;
            PlayerNPCQuestUI.container.sizeScale_X      = 1f;
            PlayerNPCQuestUI.container.sizeScale_Y      = 1f;
            PlayerUI.container.add(PlayerNPCQuestUI.container);
            PlayerNPCQuestUI.active   = false;
            PlayerNPCQuestUI.questBox = new SleekBox();
            PlayerNPCQuestUI.questBox.positionOffset_X = -250;
            PlayerNPCQuestUI.questBox.positionScale_X  = 0.5f;
            PlayerNPCQuestUI.questBox.sizeOffset_X     = 500;
            PlayerNPCQuestUI.container.add(PlayerNPCQuestUI.questBox);
            PlayerNPCQuestUI.nameLabel = new SleekLabel();
            PlayerNPCQuestUI.nameLabel.positionOffset_X = 5;
            PlayerNPCQuestUI.nameLabel.positionOffset_Y = 5;
            PlayerNPCQuestUI.nameLabel.sizeOffset_X     = -10;
            PlayerNPCQuestUI.nameLabel.sizeOffset_Y     = 30;
            PlayerNPCQuestUI.nameLabel.sizeScale_X      = 1f;
            PlayerNPCQuestUI.nameLabel.fontAlignment    = TextAnchor.UpperLeft;
            PlayerNPCQuestUI.nameLabel.foregroundTint   = ESleekTint.NONE;
            PlayerNPCQuestUI.nameLabel.isRich           = true;
            PlayerNPCQuestUI.nameLabel.fontSize         = 14;
            PlayerNPCQuestUI.questBox.add(PlayerNPCQuestUI.nameLabel);
            PlayerNPCQuestUI.descriptionLabel = new SleekLabel();
            PlayerNPCQuestUI.descriptionLabel.positionOffset_X = 5;
            PlayerNPCQuestUI.descriptionLabel.positionOffset_Y = 30;
            PlayerNPCQuestUI.descriptionLabel.sizeOffset_X     = -10;
            PlayerNPCQuestUI.descriptionLabel.sizeOffset_Y     = -35;
            PlayerNPCQuestUI.descriptionLabel.sizeScale_X      = 1f;
            PlayerNPCQuestUI.descriptionLabel.sizeScale_Y      = 1f;
            PlayerNPCQuestUI.descriptionLabel.fontAlignment    = TextAnchor.UpperLeft;
            PlayerNPCQuestUI.descriptionLabel.foregroundTint   = ESleekTint.NONE;
            PlayerNPCQuestUI.descriptionLabel.isRich           = true;
            PlayerNPCQuestUI.questBox.add(PlayerNPCQuestUI.descriptionLabel);
            PlayerNPCQuestUI.detailsBox = new SleekScrollBox();
            PlayerNPCQuestUI.detailsBox.positionOffset_X = 5;
            PlayerNPCQuestUI.detailsBox.positionScale_Y  = 1f;
            PlayerNPCQuestUI.detailsBox.sizeScale_X      = 1f;
            PlayerNPCQuestUI.questBox.add(PlayerNPCQuestUI.detailsBox);
            PlayerNPCQuestUI.conditionsLabel = new SleekLabel();
            PlayerNPCQuestUI.conditionsLabel.sizeOffset_X  = -30;
            PlayerNPCQuestUI.conditionsLabel.sizeOffset_Y  = 30;
            PlayerNPCQuestUI.conditionsLabel.sizeScale_X   = 1f;
            PlayerNPCQuestUI.conditionsLabel.fontAlignment = TextAnchor.MiddleLeft;
            PlayerNPCQuestUI.conditionsLabel.text          = PlayerNPCQuestUI.localization.format("Conditions");
            PlayerNPCQuestUI.conditionsLabel.fontSize      = 14;
            PlayerNPCQuestUI.detailsBox.add(PlayerNPCQuestUI.conditionsLabel);
            PlayerNPCQuestUI.conditionsContainer = new Sleek();
            PlayerNPCQuestUI.conditionsContainer.positionOffset_Y = 30;
            PlayerNPCQuestUI.conditionsContainer.sizeOffset_X     = -30;
            PlayerNPCQuestUI.conditionsContainer.sizeScale_X      = 1f;
            PlayerNPCQuestUI.detailsBox.add(PlayerNPCQuestUI.conditionsContainer);
            PlayerNPCQuestUI.rewardsLabel = new SleekLabel();
            PlayerNPCQuestUI.rewardsLabel.sizeOffset_X  = -30;
            PlayerNPCQuestUI.rewardsLabel.sizeOffset_Y  = 30;
            PlayerNPCQuestUI.rewardsLabel.sizeScale_X   = 1f;
            PlayerNPCQuestUI.rewardsLabel.fontAlignment = TextAnchor.MiddleLeft;
            PlayerNPCQuestUI.rewardsLabel.text          = PlayerNPCQuestUI.localization.format("Rewards");
            PlayerNPCQuestUI.rewardsLabel.fontSize      = 14;
            PlayerNPCQuestUI.detailsBox.add(PlayerNPCQuestUI.rewardsLabel);
            PlayerNPCQuestUI.rewardsContainer = new Sleek();
            PlayerNPCQuestUI.rewardsContainer.sizeOffset_X = -30;
            PlayerNPCQuestUI.rewardsContainer.sizeScale_X  = 1f;
            PlayerNPCQuestUI.detailsBox.add(PlayerNPCQuestUI.rewardsContainer);
            PlayerNPCQuestUI.beginContainer = new Sleek();
            PlayerNPCQuestUI.beginContainer.positionOffset_Y = 10;
            PlayerNPCQuestUI.beginContainer.positionScale_Y  = 1f;
            PlayerNPCQuestUI.beginContainer.sizeOffset_Y     = 50;
            PlayerNPCQuestUI.beginContainer.sizeScale_X      = 1f;
            PlayerNPCQuestUI.questBox.add(PlayerNPCQuestUI.beginContainer);
            PlayerNPCQuestUI.beginContainer.isVisible      = false;
            PlayerNPCQuestUI.endContainer                  = new Sleek();
            PlayerNPCQuestUI.endContainer.positionOffset_Y = 10;
            PlayerNPCQuestUI.endContainer.positionScale_Y  = 1f;
            PlayerNPCQuestUI.endContainer.sizeOffset_Y     = 50;
            PlayerNPCQuestUI.endContainer.sizeScale_X      = 1f;
            PlayerNPCQuestUI.questBox.add(PlayerNPCQuestUI.endContainer);
            PlayerNPCQuestUI.endContainer.isVisible            = false;
            PlayerNPCQuestUI.detailsContainer                  = new Sleek();
            PlayerNPCQuestUI.detailsContainer.positionOffset_Y = 10;
            PlayerNPCQuestUI.detailsContainer.positionScale_Y  = 1f;
            PlayerNPCQuestUI.detailsContainer.sizeOffset_Y     = 50;
            PlayerNPCQuestUI.detailsContainer.sizeScale_X      = 1f;
            PlayerNPCQuestUI.questBox.add(PlayerNPCQuestUI.detailsContainer);
            PlayerNPCQuestUI.detailsContainer.isVisible = false;
            PlayerNPCQuestUI.acceptButton = new SleekButton();
            PlayerNPCQuestUI.acceptButton.sizeOffset_X = -5;
            PlayerNPCQuestUI.acceptButton.sizeScale_X  = 0.5f;
            PlayerNPCQuestUI.acceptButton.sizeScale_Y  = 1f;
            PlayerNPCQuestUI.acceptButton.text         = PlayerNPCQuestUI.localization.format("Accept");
            PlayerNPCQuestUI.acceptButton.tooltip      = PlayerNPCQuestUI.localization.format("Accept_Tooltip");
            PlayerNPCQuestUI.acceptButton.fontSize     = 14;
            SleekButton sleekButton = PlayerNPCQuestUI.acceptButton;

            if (PlayerNPCQuestUI.< > f__mg$cache0 == null)
            {
                PlayerNPCQuestUI.< > f__mg$cache0 = new ClickedButton(PlayerNPCQuestUI.onClickedAcceptButton);
            }
            sleekButton.onClickedButton = PlayerNPCQuestUI.< > f__mg$cache0;
            PlayerNPCQuestUI.beginContainer.add(PlayerNPCQuestUI.acceptButton);
            PlayerNPCQuestUI.declineButton = new SleekButton();
            PlayerNPCQuestUI.declineButton.positionOffset_X = 5;
            PlayerNPCQuestUI.declineButton.positionScale_X  = 0.5f;
            PlayerNPCQuestUI.declineButton.sizeOffset_X     = -5;
            PlayerNPCQuestUI.declineButton.sizeScale_X      = 0.5f;
            PlayerNPCQuestUI.declineButton.sizeScale_Y      = 1f;
            PlayerNPCQuestUI.declineButton.text             = PlayerNPCQuestUI.localization.format("Decline");
            PlayerNPCQuestUI.declineButton.tooltip          = PlayerNPCQuestUI.localization.format("Decline_Tooltip");
            PlayerNPCQuestUI.declineButton.fontSize         = 14;
            SleekButton sleekButton2 = PlayerNPCQuestUI.declineButton;

            if (PlayerNPCQuestUI.< > f__mg$cache1 == null)
            {
                PlayerNPCQuestUI.< > f__mg$cache1 = new ClickedButton(PlayerNPCQuestUI.onClickedDeclineButton);
            }
            sleekButton2.onClickedButton = PlayerNPCQuestUI.< > f__mg$cache1;
            PlayerNPCQuestUI.beginContainer.add(PlayerNPCQuestUI.declineButton);
            PlayerNPCQuestUI.continueButton             = new SleekButton();
            PlayerNPCQuestUI.continueButton.sizeScale_X = 1f;
            PlayerNPCQuestUI.continueButton.sizeScale_Y = 1f;
            PlayerNPCQuestUI.continueButton.text        = PlayerNPCQuestUI.localization.format("Continue");
            PlayerNPCQuestUI.continueButton.tooltip     = PlayerNPCQuestUI.localization.format("Continue_Tooltip");
            PlayerNPCQuestUI.continueButton.fontSize    = 14;
            SleekButton sleekButton3 = PlayerNPCQuestUI.continueButton;

            if (PlayerNPCQuestUI.< > f__mg$cache2 == null)
            {
                PlayerNPCQuestUI.< > f__mg$cache2 = new ClickedButton(PlayerNPCQuestUI.onClickedContinueButton);
            }
            sleekButton3.onClickedButton = PlayerNPCQuestUI.< > f__mg$cache2;
            PlayerNPCQuestUI.endContainer.add(PlayerNPCQuestUI.continueButton);
            PlayerNPCQuestUI.trackButton = new SleekButton();
            PlayerNPCQuestUI.trackButton.sizeOffset_X = -5;
            PlayerNPCQuestUI.trackButton.sizeScale_X  = 0.333f;
            PlayerNPCQuestUI.trackButton.sizeScale_Y  = 1f;
            PlayerNPCQuestUI.trackButton.tooltip      = PlayerNPCQuestUI.localization.format("Track_Tooltip");
            PlayerNPCQuestUI.trackButton.fontSize     = 14;
            SleekButton sleekButton4 = PlayerNPCQuestUI.trackButton;

            if (PlayerNPCQuestUI.< > f__mg$cache3 == null)
            {
                PlayerNPCQuestUI.< > f__mg$cache3 = new ClickedButton(PlayerNPCQuestUI.onClickedTrackButton);
            }
            sleekButton4.onClickedButton = PlayerNPCQuestUI.< > f__mg$cache3;
            PlayerNPCQuestUI.detailsContainer.add(PlayerNPCQuestUI.trackButton);
            PlayerNPCQuestUI.abandonButton = new SleekButton();
            PlayerNPCQuestUI.abandonButton.positionOffset_X = 5;
            PlayerNPCQuestUI.abandonButton.positionScale_X  = 0.333f;
            PlayerNPCQuestUI.abandonButton.sizeOffset_X     = -10;
            PlayerNPCQuestUI.abandonButton.sizeScale_X      = 0.333f;
            PlayerNPCQuestUI.abandonButton.sizeScale_Y      = 1f;
            PlayerNPCQuestUI.abandonButton.text             = PlayerNPCQuestUI.localization.format("Abandon");
            PlayerNPCQuestUI.abandonButton.tooltip          = PlayerNPCQuestUI.localization.format("Abandon_Tooltip");
            PlayerNPCQuestUI.abandonButton.fontSize         = 14;
            SleekButton sleekButton5 = PlayerNPCQuestUI.abandonButton;

            if (PlayerNPCQuestUI.< > f__mg$cache4 == null)
            {
                PlayerNPCQuestUI.< > f__mg$cache4 = new ClickedButton(PlayerNPCQuestUI.onClickedAbandonButton);
            }
            sleekButton5.onClickedButton = PlayerNPCQuestUI.< > f__mg$cache4;
            PlayerNPCQuestUI.detailsContainer.add(PlayerNPCQuestUI.abandonButton);
            PlayerNPCQuestUI.returnButton = new SleekButton();
            PlayerNPCQuestUI.returnButton.positionOffset_X = 5;
            PlayerNPCQuestUI.returnButton.positionScale_X  = 0.667f;
            PlayerNPCQuestUI.returnButton.sizeOffset_X     = -5;
            PlayerNPCQuestUI.returnButton.sizeScale_X      = 0.333f;
            PlayerNPCQuestUI.returnButton.sizeScale_Y      = 1f;
            PlayerNPCQuestUI.returnButton.text             = PlayerNPCQuestUI.localization.format("Return");
            PlayerNPCQuestUI.returnButton.tooltip          = PlayerNPCQuestUI.localization.format("Return_Tooltip");
            PlayerNPCQuestUI.returnButton.fontSize         = 14;
            SleekButton sleekButton6 = PlayerNPCQuestUI.returnButton;

            if (PlayerNPCQuestUI.< > f__mg$cache5 == null)
            {
                PlayerNPCQuestUI.< > f__mg$cache5 = new ClickedButton(PlayerNPCQuestUI.onClickedReturnButton);
            }
            sleekButton6.onClickedButton = PlayerNPCQuestUI.< > f__mg$cache5;
            PlayerNPCQuestUI.detailsContainer.add(PlayerNPCQuestUI.returnButton);
        }
Example #15
0
 public static void load()
 {
     LevelRoads._models                 = new GameObject().transform;
     LevelRoads.models.name             = "Roads";
     LevelRoads.models.parent           = Level.level;
     LevelRoads.models.tag              = "Logic";
     LevelRoads.models.gameObject.layer = LayerMasks.LOGIC;
     if (ReadWrite.fileExists(Level.info.path + "/Environment/Roads.unity3d", false, false))
     {
         Bundle   bundle = Bundles.getBundle(Level.info.path + "/Environment/Roads.unity3d", false);
         Object[] array  = bundle.load();
         bundle.unload();
         LevelRoads._materials = new RoadMaterial[array.Length];
         for (int i = 0; i < LevelRoads.materials.Length; i++)
         {
             LevelRoads.materials[i] = new RoadMaterial((Texture2D)array[i]);
         }
     }
     else
     {
         LevelRoads._materials = new RoadMaterial[0];
     }
     LevelRoads.roads = new List <Road>();
     if (ReadWrite.fileExists(Level.info.path + "/Environment/Roads.dat", false, false))
     {
         River river = new River(Level.info.path + "/Environment/Roads.dat", false);
         byte  b     = river.readByte();
         if (b > 0)
         {
             byte b2 = river.readByte();
             for (byte b3 = 0; b3 < b2; b3 += 1)
             {
                 if ((int)b3 >= LevelRoads.materials.Length)
                 {
                     break;
                 }
                 LevelRoads.materials[(int)b3].width  = river.readSingle();
                 LevelRoads.materials[(int)b3].height = river.readSingle();
                 LevelRoads.materials[(int)b3].depth  = river.readSingle();
                 if (b > 1)
                 {
                     LevelRoads.materials[(int)b3].offset = river.readSingle();
                 }
                 LevelRoads.materials[(int)b3].isConcrete = river.readBoolean();
             }
         }
         river.closeRiver();
     }
     if (ReadWrite.fileExists(Level.info.path + "/Environment/Paths.dat", false, false))
     {
         River river2 = new River(Level.info.path + "/Environment/Paths.dat", false);
         byte  b4     = river2.readByte();
         if (b4 > 1)
         {
             ushort num = river2.readUInt16();
             for (ushort num2 = 0; num2 < num; num2 += 1)
             {
                 ushort           num3        = river2.readUInt16();
                 byte             newMaterial = river2.readByte();
                 bool             newLoop     = b4 > 2 && river2.readBoolean();
                 List <RoadJoint> list        = new List <RoadJoint>();
                 for (ushort num4 = 0; num4 < num3; num4 += 1)
                 {
                     Vector3   vertex = river2.readSingleVector3();
                     Vector3[] array2 = new Vector3[2];
                     if (b4 > 2)
                     {
                         array2[0] = river2.readSingleVector3();
                         array2[1] = river2.readSingleVector3();
                     }
                     ERoadMode mode;
                     if (b4 > 2)
                     {
                         mode = (ERoadMode)river2.readByte();
                     }
                     else
                     {
                         mode = ERoadMode.FREE;
                     }
                     float offset;
                     if (b4 > 4)
                     {
                         offset = river2.readSingle();
                     }
                     else
                     {
                         offset = 0f;
                     }
                     bool      ignoreTerrain = b4 > 3 && river2.readBoolean();
                     RoadJoint item          = new RoadJoint(vertex, array2, mode, offset, ignoreTerrain);
                     list.Add(item);
                 }
                 if (b4 < 3)
                 {
                     for (ushort num5 = 0; num5 < num3; num5 += 1)
                     {
                         RoadJoint roadJoint = list[(int)num5];
                         if (num5 == 0)
                         {
                             roadJoint.setTangent(0, (roadJoint.vertex - list[(int)(num5 + 1)].vertex).normalized * 2.5f);
                             roadJoint.setTangent(1, (list[(int)(num5 + 1)].vertex - roadJoint.vertex).normalized * 2.5f);
                         }
                         else if (num5 == num3 - 1)
                         {
                             roadJoint.setTangent(0, (list[(int)(num5 - 1)].vertex - roadJoint.vertex).normalized * 2.5f);
                             roadJoint.setTangent(1, (roadJoint.vertex - list[(int)(num5 - 1)].vertex).normalized * 2.5f);
                         }
                         else
                         {
                             roadJoint.setTangent(0, (list[(int)(num5 - 1)].vertex - roadJoint.vertex).normalized * 2.5f);
                             roadJoint.setTangent(1, (list[(int)(num5 + 1)].vertex - roadJoint.vertex).normalized * 2.5f);
                         }
                     }
                 }
                 LevelRoads.roads.Add(new Road(newMaterial, newLoop, list));
             }
         }
         else if (b4 > 0)
         {
             byte b5 = river2.readByte();
             for (byte b6 = 0; b6 < b5; b6 += 1)
             {
                 byte             b7           = river2.readByte();
                 byte             newMaterial2 = river2.readByte();
                 List <RoadJoint> list2        = new List <RoadJoint>();
                 for (byte b8 = 0; b8 < b7; b8 += 1)
                 {
                     Vector3   vertex2  = river2.readSingleVector3();
                     Vector3[] tangents = new Vector3[2];
                     ERoadMode mode2    = ERoadMode.FREE;
                     RoadJoint item2    = new RoadJoint(vertex2, tangents, mode2, 0f, false);
                     list2.Add(item2);
                 }
                 for (byte b9 = 0; b9 < b7; b9 += 1)
                 {
                     RoadJoint roadJoint2 = list2[(int)b9];
                     if (b9 == 0)
                     {
                         roadJoint2.setTangent(0, (roadJoint2.vertex - list2[(int)(b9 + 1)].vertex).normalized * 2.5f);
                         roadJoint2.setTangent(1, (list2[(int)(b9 + 1)].vertex - roadJoint2.vertex).normalized * 2.5f);
                     }
                     else if (b9 == b7 - 1)
                     {
                         roadJoint2.setTangent(0, (list2[(int)(b9 - 1)].vertex - roadJoint2.vertex).normalized * 2.5f);
                         roadJoint2.setTangent(1, (roadJoint2.vertex - list2[(int)(b9 - 1)].vertex).normalized * 2.5f);
                     }
                     else
                     {
                         roadJoint2.setTangent(0, (list2[(int)(b9 - 1)].vertex - roadJoint2.vertex).normalized * 2.5f);
                         roadJoint2.setTangent(1, (list2[(int)(b9 + 1)].vertex - roadJoint2.vertex).normalized * 2.5f);
                     }
                 }
                 LevelRoads.roads.Add(new Road(newMaterial2, false, list2));
             }
         }
         river2.closeRiver();
     }
     if (LevelGround.terrain != null)
     {
         LevelRoads.buildMeshes();
     }
     if (!LevelRoads.isListeningForLandscape)
     {
         LevelRoads.isListeningForLandscape = true;
         if (LevelRoads.< > f__mg$cache0 == null)
         {
             LevelRoads.< > f__mg$cache0 = new LandscapeLoadedHandler(LevelRoads.handleLandscapeLoaded);
         }
         Landscape.loaded += LevelRoads.< > f__mg$cache0;
     }
 }
Example #16
0
        public SleekLevel(LevelInfo level, bool isEditor)
        {
            base.init();
            base.sizeOffset_X        = 400;
            base.sizeOffset_Y        = 100;
            this.button              = new SleekButton();
            this.button.sizeOffset_X = 0;
            this.button.sizeOffset_Y = 0;
            this.button.sizeScale_X  = 1f;
            this.button.sizeScale_Y  = 1f;
            if (level.isEditable || !isEditor)
            {
                this.button.onClickedButton = new ClickedButton(this.onClickedButton);
            }
            base.add(this.button);
            if (ReadWrite.fileExists(level.path + "/Icon.png", false, false))
            {
                byte[]    array     = ReadWrite.readBytes(level.path + "/Icon.png", false, false);
                Texture2D texture2D = new Texture2D(380, 80, 5, false, true);
                texture2D.name      = "Icon_" + level.name + "_List_Icon";
                texture2D.hideFlags = 61;
                texture2D.LoadImage(array);
                this.icon = new SleekImageTexture();
                this.icon.positionOffset_X     = 10;
                this.icon.positionOffset_Y     = 10;
                this.icon.sizeOffset_X         = -20;
                this.icon.sizeOffset_Y         = -20;
                this.icon.sizeScale_X          = 1f;
                this.icon.sizeScale_Y          = 1f;
                this.icon.texture              = texture2D;
                this.icon.shouldDestroyTexture = true;
                this.button.add(this.icon);
            }
            this.nameLabel = new SleekLabel();
            this.nameLabel.positionOffset_Y = 10;
            this.nameLabel.sizeScale_X      = 1f;
            this.nameLabel.sizeOffset_Y     = 50;
            this.nameLabel.fontAlignment    = 4;
            this.nameLabel.fontSize         = 14;
            this.button.add(this.nameLabel);
            Local local = Localization.tryRead(level.path, false);

            if (local != null && local.has("Name"))
            {
                this.nameLabel.text = local.format("Name");
            }
            else
            {
                this.nameLabel.text = level.name;
            }
            this.infoLabel = new SleekLabel();
            this.infoLabel.positionOffset_Y = 60;
            this.infoLabel.sizeScale_X      = 1f;
            this.infoLabel.sizeOffset_Y     = 30;
            this.infoLabel.fontAlignment    = 4;
            string text = "#SIZE";

            if (level.size == ELevelSize.TINY)
            {
                text = MenuPlaySingleplayerUI.localization.format("Tiny");
            }
            else if (level.size == ELevelSize.SMALL)
            {
                text = MenuPlaySingleplayerUI.localization.format("Small");
            }
            else if (level.size == ELevelSize.MEDIUM)
            {
                text = MenuPlaySingleplayerUI.localization.format("Medium");
            }
            else if (level.size == ELevelSize.LARGE)
            {
                text = MenuPlaySingleplayerUI.localization.format("Large");
            }
            else if (level.size == ELevelSize.INSANE)
            {
                text = MenuPlaySingleplayerUI.localization.format("Insane");
            }
            string text2 = "#TYPE";

            if (level.type == ELevelType.SURVIVAL)
            {
                text2 = MenuPlaySingleplayerUI.localization.format("Survival");
            }
            else if (level.type == ELevelType.HORDE)
            {
                text2 = MenuPlaySingleplayerUI.localization.format("Horde");
            }
            else if (level.type == ELevelType.ARENA)
            {
                text2 = MenuPlaySingleplayerUI.localization.format("Arena");
            }
            this.infoLabel.text = MenuPlaySingleplayerUI.localization.format("Info", new object[]
            {
                text,
                text2
            });
            this.button.add(this.infoLabel);
            if (!level.isEditable && isEditor)
            {
                Bundle            bundle            = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Workshop/MenuWorkshopEditor/MenuWorkshopEditor.unity3d");
                SleekImageTexture sleekImageTexture = new SleekImageTexture();
                sleekImageTexture.positionOffset_X = 20;
                sleekImageTexture.positionOffset_Y = -20;
                sleekImageTexture.positionScale_Y  = 0.5f;
                sleekImageTexture.sizeOffset_X     = 40;
                sleekImageTexture.sizeOffset_Y     = 40;
                sleekImageTexture.texture          = (Texture2D)bundle.load("Lock");
                sleekImageTexture.backgroundTint   = ESleekTint.FOREGROUND;
                this.button.add(sleekImageTexture);
                bundle.unload();
            }
            if (level.configData != null && level.configData.Status != EMapStatus.NONE)
            {
                SleekNew sleek = new SleekNew(level.configData.Status == EMapStatus.UPDATED);
                if (this.icon != null)
                {
                    this.icon.add(sleek);
                }
                else
                {
                    base.add(sleek);
                }
            }
        }
Example #17
0
        public PlayerDashboardCraftingUI()
        {
            if (PlayerDashboardCraftingUI.icons != null)
            {
                PlayerDashboardCraftingUI.icons.unload();
            }
            PlayerDashboardCraftingUI.localization = Localization.read("/Player/PlayerDashboardCrafting.dat");
            PlayerDashboardCraftingUI.icons        = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerDashboardCrafting/PlayerDashboardCrafting.unity3d");
            PlayerDashboardCraftingUI.container    = new Sleek();
            PlayerDashboardCraftingUI.container.positionScale_Y  = 1f;
            PlayerDashboardCraftingUI.container.positionOffset_X = 10;
            PlayerDashboardCraftingUI.container.positionOffset_Y = 10;
            PlayerDashboardCraftingUI.container.sizeOffset_X     = -20;
            PlayerDashboardCraftingUI.container.sizeOffset_Y     = -20;
            PlayerDashboardCraftingUI.container.sizeScale_X      = 1f;
            PlayerDashboardCraftingUI.container.sizeScale_Y      = 1f;
            PlayerUI.container.add(PlayerDashboardCraftingUI.container);
            PlayerDashboardCraftingUI.active          = false;
            PlayerDashboardCraftingUI.selectedType    = byte.MaxValue;
            PlayerDashboardCraftingUI.hideUncraftable = false;
            PlayerDashboardCraftingUI.searchText      = string.Empty;
            PlayerDashboardCraftingUI.backdropBox     = new SleekBox();
            PlayerDashboardCraftingUI.backdropBox.positionOffset_Y = 60;
            PlayerDashboardCraftingUI.backdropBox.sizeOffset_Y     = -60;
            PlayerDashboardCraftingUI.backdropBox.sizeScale_X      = 1f;
            PlayerDashboardCraftingUI.backdropBox.sizeScale_Y      = 1f;
            Color white = Color.white;

            white.a = 0.5f;
            PlayerDashboardCraftingUI.backdropBox.backgroundColor = white;
            PlayerDashboardCraftingUI.container.add(PlayerDashboardCraftingUI.backdropBox);
            PlayerDashboardCraftingUI.blueprintsScrollBox = new SleekScrollBox();
            PlayerDashboardCraftingUI.blueprintsScrollBox.positionOffset_X = 10;
            PlayerDashboardCraftingUI.blueprintsScrollBox.positionOffset_Y = 110;
            PlayerDashboardCraftingUI.blueprintsScrollBox.sizeOffset_X     = -20;
            PlayerDashboardCraftingUI.blueprintsScrollBox.sizeOffset_Y     = -120;
            PlayerDashboardCraftingUI.blueprintsScrollBox.sizeScale_X      = 1f;
            PlayerDashboardCraftingUI.blueprintsScrollBox.sizeScale_Y      = 1f;
            PlayerDashboardCraftingUI.backdropBox.add(PlayerDashboardCraftingUI.blueprintsScrollBox);
            for (int i = 0; i < PlayerDashboardCraftingUI.TYPES; i++)
            {
                SleekButtonIcon sleekButtonIcon = new SleekButtonIcon((Texture2D)PlayerDashboardCraftingUI.icons.load("Blueprint_" + i));
                sleekButtonIcon.positionOffset_X         = PlayerDashboardCraftingUI.TYPES * -30 + 5 + i * 60;
                sleekButtonIcon.positionOffset_Y         = 10;
                sleekButtonIcon.positionScale_X          = 0.5f;
                sleekButtonIcon.sizeOffset_X             = 50;
                sleekButtonIcon.sizeOffset_Y             = 50;
                sleekButtonIcon.tooltip                  = PlayerDashboardCraftingUI.localization.format("Type_" + i + "_Tooltip");
                sleekButtonIcon.iconImage.backgroundTint = ESleekTint.FOREGROUND;
                SleekButton sleekButton = sleekButtonIcon;
                if (PlayerDashboardCraftingUI.< > f__mg$cache1 == null)
                {
                    PlayerDashboardCraftingUI.< > f__mg$cache1 = new ClickedButton(PlayerDashboardCraftingUI.onClickedTypeButton);
                }
                sleekButton.onClickedButton = PlayerDashboardCraftingUI.< > f__mg$cache1;
                PlayerDashboardCraftingUI.backdropBox.add(sleekButtonIcon);
            }
            PlayerDashboardCraftingUI.hideUncraftableToggle = new SleekToggle();
            PlayerDashboardCraftingUI.hideUncraftableToggle.positionOffset_X = -80;
            PlayerDashboardCraftingUI.hideUncraftableToggle.positionOffset_Y = 65;
            PlayerDashboardCraftingUI.hideUncraftableToggle.positionScale_X  = 1f;
            PlayerDashboardCraftingUI.hideUncraftableToggle.sizeOffset_X     = 40;
            PlayerDashboardCraftingUI.hideUncraftableToggle.sizeOffset_Y     = 40;
            PlayerDashboardCraftingUI.hideUncraftableToggle.addLabel(PlayerDashboardCraftingUI.localization.format("Hide_Uncraftable_Toggle_Label"), ESleekSide.LEFT);
            PlayerDashboardCraftingUI.hideUncraftableToggle.state = PlayerDashboardCraftingUI.hideUncraftable;
            SleekToggle sleekToggle = PlayerDashboardCraftingUI.hideUncraftableToggle;

            if (PlayerDashboardCraftingUI.< > f__mg$cache2 == null)
            {
                PlayerDashboardCraftingUI.< > f__mg$cache2 = new Toggled(PlayerDashboardCraftingUI.onToggledHideUncraftableToggle);
            }
            sleekToggle.onToggled = PlayerDashboardCraftingUI.< > f__mg$cache2;
            PlayerDashboardCraftingUI.backdropBox.add(PlayerDashboardCraftingUI.hideUncraftableToggle);
            PlayerDashboardCraftingUI.searchField = new SleekField();
            PlayerDashboardCraftingUI.searchField.positionOffset_X = 10;
            PlayerDashboardCraftingUI.searchField.positionOffset_Y = 70;
            PlayerDashboardCraftingUI.searchField.sizeOffset_X     = -410;
            PlayerDashboardCraftingUI.searchField.sizeOffset_Y     = 30;
            PlayerDashboardCraftingUI.searchField.sizeScale_X      = 1f;
            PlayerDashboardCraftingUI.searchField.hint             = PlayerDashboardCraftingUI.localization.format("Search_Field_Hint");
            PlayerDashboardCraftingUI.searchField.control          = "Search";
            SleekField sleekField = PlayerDashboardCraftingUI.searchField;
            Delegate   onEntered  = sleekField.onEntered;

            if (PlayerDashboardCraftingUI.< > f__mg$cache3 == null)
            {
                PlayerDashboardCraftingUI.< > f__mg$cache3 = new Entered(PlayerDashboardCraftingUI.onEnteredSearchField);
            }
            sleekField.onEntered = (Entered)Delegate.Combine(onEntered, PlayerDashboardCraftingUI.< > f__mg$cache3);
            PlayerDashboardCraftingUI.backdropBox.add(PlayerDashboardCraftingUI.searchField);
            PlayerDashboardCraftingUI.searchButton = new SleekButton();
            PlayerDashboardCraftingUI.searchButton.positionOffset_X = -390;
            PlayerDashboardCraftingUI.searchButton.positionOffset_Y = 70;
            PlayerDashboardCraftingUI.searchButton.positionScale_X  = 1f;
            PlayerDashboardCraftingUI.searchButton.sizeOffset_X     = 100;
            PlayerDashboardCraftingUI.searchButton.sizeOffset_Y     = 30;
            PlayerDashboardCraftingUI.searchButton.text             = PlayerDashboardCraftingUI.localization.format("Search");
            PlayerDashboardCraftingUI.searchButton.tooltip          = PlayerDashboardCraftingUI.localization.format("Search_Tooltip");
            SleekButton sleekButton2 = PlayerDashboardCraftingUI.searchButton;

            if (PlayerDashboardCraftingUI.< > f__mg$cache4 == null)
            {
                PlayerDashboardCraftingUI.< > f__mg$cache4 = new ClickedButton(PlayerDashboardCraftingUI.onClickedSearchButton);
            }
            sleekButton2.onClickedButton = PlayerDashboardCraftingUI.< > f__mg$cache4;
            PlayerDashboardCraftingUI.backdropBox.add(PlayerDashboardCraftingUI.searchButton);
            PlayerDashboardCraftingUI.infoBox = new SleekBox();
            PlayerDashboardCraftingUI.infoBox.positionOffset_X = 10;
            PlayerDashboardCraftingUI.infoBox.positionOffset_Y = 110;
            PlayerDashboardCraftingUI.infoBox.sizeOffset_X     = -20;
            PlayerDashboardCraftingUI.infoBox.sizeOffset_Y     = 50;
            PlayerDashboardCraftingUI.infoBox.sizeScale_X      = 1f;
            PlayerDashboardCraftingUI.infoBox.text             = PlayerDashboardCraftingUI.localization.format("No_Blueprints");
            PlayerDashboardCraftingUI.infoBox.fontSize         = 14;
            PlayerDashboardCraftingUI.backdropBox.add(PlayerDashboardCraftingUI.infoBox);
            PlayerDashboardCraftingUI.infoBox.isVisible = false;
            PlayerDashboardCraftingUI.viewBlueprints    = null;
            PlayerDashboardCraftingUI.selectedType      = 0;
            PlayerDashboardCraftingUI.hideUncraftable   = false;
            PlayerDashboardCraftingUI.searchText        = string.Empty;
            PlayerInventory inventory          = Player.player.inventory;
            Delegate        onInventoryResized = inventory.onInventoryResized;

            if (PlayerDashboardCraftingUI.< > f__mg$cache5 == null)
            {
                PlayerDashboardCraftingUI.< > f__mg$cache5 = new InventoryResized(PlayerDashboardCraftingUI.onInventoryResized);
            }
            inventory.onInventoryResized = (InventoryResized)Delegate.Combine(onInventoryResized, PlayerDashboardCraftingUI.< > f__mg$cache5);
            PlayerCrafting crafting          = Player.player.crafting;
            Delegate       onCraftingUpdated = crafting.onCraftingUpdated;

            if (PlayerDashboardCraftingUI.< > f__mg$cache6 == null)
            {
                PlayerDashboardCraftingUI.< > f__mg$cache6 = new CraftingUpdated(PlayerDashboardCraftingUI.onCraftingUpdated);
            }
            crafting.onCraftingUpdated = (CraftingUpdated)Delegate.Combine(onCraftingUpdated, PlayerDashboardCraftingUI.< > f__mg$cache6);
        }
        public MenuWorkshopSubmitUI()
        {
            MenuWorkshopSubmitUI.localization = Localization.read("/Menu/Workshop/MenuWorkshopSubmit.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Workshop/MenuWorkshopSubmit/MenuWorkshopSubmit.unity3d");

            MenuWorkshopSubmitUI.publishedButtons = new List <SleekButton>();
            TempSteamworksWorkshop workshopService = Provider.provider.workshopService;
            Delegate onPublishedAdded = workshopService.onPublishedAdded;

            if (MenuWorkshopSubmitUI.< > f__mg$cache1 == null)
            {
                MenuWorkshopSubmitUI.< > f__mg$cache1 = new TempSteamworksWorkshop.PublishedAdded(MenuWorkshopSubmitUI.onPublishedAdded);
            }
            workshopService.onPublishedAdded = (TempSteamworksWorkshop.PublishedAdded)Delegate.Combine(onPublishedAdded, MenuWorkshopSubmitUI.< > f__mg$cache1);
            TempSteamworksWorkshop workshopService2 = Provider.provider.workshopService;
            Delegate onPublishedRemoved             = workshopService2.onPublishedRemoved;

            if (MenuWorkshopSubmitUI.< > f__mg$cache2 == null)
            {
                MenuWorkshopSubmitUI.< > f__mg$cache2 = new TempSteamworksWorkshop.PublishedRemoved(MenuWorkshopSubmitUI.onPublishedRemoved);
            }
            workshopService2.onPublishedRemoved             = (TempSteamworksWorkshop.PublishedRemoved)Delegate.Combine(onPublishedRemoved, MenuWorkshopSubmitUI.< > f__mg$cache2);
            MenuWorkshopSubmitUI.container                  = new Sleek();
            MenuWorkshopSubmitUI.container.positionOffset_X = 10;
            MenuWorkshopSubmitUI.container.positionOffset_Y = 10;
            MenuWorkshopSubmitUI.container.positionScale_Y  = 1f;
            MenuWorkshopSubmitUI.container.sizeOffset_X     = -20;
            MenuWorkshopSubmitUI.container.sizeOffset_Y     = -20;
            MenuWorkshopSubmitUI.container.sizeScale_X      = 1f;
            MenuWorkshopSubmitUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuWorkshopSubmitUI.container);
            MenuWorkshopSubmitUI.active    = false;
            MenuWorkshopSubmitUI.nameField = new SleekField();
            MenuWorkshopSubmitUI.nameField.positionOffset_X = -200;
            MenuWorkshopSubmitUI.nameField.positionOffset_Y = 100;
            MenuWorkshopSubmitUI.nameField.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.nameField.sizeOffset_X     = 200;
            MenuWorkshopSubmitUI.nameField.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.nameField.maxLength        = 24;
            MenuWorkshopSubmitUI.nameField.addLabel(MenuWorkshopSubmitUI.localization.format("Name_Field_Label"), ESleekSide.RIGHT);
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.nameField);
            MenuWorkshopSubmitUI.descriptionField = new SleekField();
            MenuWorkshopSubmitUI.descriptionField.positionOffset_X = -200;
            MenuWorkshopSubmitUI.descriptionField.positionOffset_Y = 140;
            MenuWorkshopSubmitUI.descriptionField.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.descriptionField.sizeOffset_X     = 400;
            MenuWorkshopSubmitUI.descriptionField.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.descriptionField.maxLength        = 128;
            MenuWorkshopSubmitUI.descriptionField.addLabel(MenuWorkshopSubmitUI.localization.format("Description_Field_Label"), ESleekSide.RIGHT);
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.descriptionField);
            MenuWorkshopSubmitUI.pathField = new SleekField();
            MenuWorkshopSubmitUI.pathField.positionOffset_X = -200;
            MenuWorkshopSubmitUI.pathField.positionOffset_Y = 180;
            MenuWorkshopSubmitUI.pathField.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.pathField.sizeOffset_X     = 400;
            MenuWorkshopSubmitUI.pathField.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.pathField.maxLength        = 128;
            MenuWorkshopSubmitUI.pathField.addLabel(MenuWorkshopSubmitUI.localization.format("Path_Field_Label"), ESleekSide.RIGHT);
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.pathField);
            MenuWorkshopSubmitUI.previewField = new SleekField();
            MenuWorkshopSubmitUI.previewField.positionOffset_X = -200;
            MenuWorkshopSubmitUI.previewField.positionOffset_Y = 220;
            MenuWorkshopSubmitUI.previewField.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.previewField.sizeOffset_X     = 400;
            MenuWorkshopSubmitUI.previewField.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.previewField.maxLength        = 128;
            MenuWorkshopSubmitUI.previewField.addLabel(MenuWorkshopSubmitUI.localization.format("Preview_Field_Label"), ESleekSide.RIGHT);
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.previewField);
            MenuWorkshopSubmitUI.changeField = new SleekField();
            MenuWorkshopSubmitUI.changeField.positionOffset_X = -200;
            MenuWorkshopSubmitUI.changeField.positionOffset_Y = 260;
            MenuWorkshopSubmitUI.changeField.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.changeField.sizeOffset_X     = 400;
            MenuWorkshopSubmitUI.changeField.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.changeField.maxLength        = 128;
            MenuWorkshopSubmitUI.changeField.addLabel(MenuWorkshopSubmitUI.localization.format("Change_Field_Label"), ESleekSide.RIGHT);
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.changeField);
            MenuWorkshopSubmitUI.typeState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Map")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Localization")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Object")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Vehicle")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin"))
            });
            MenuWorkshopSubmitUI.typeState.positionOffset_X = -200;
            MenuWorkshopSubmitUI.typeState.positionOffset_Y = 300;
            MenuWorkshopSubmitUI.typeState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.typeState.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.typeState.sizeOffset_Y     = 30;
            SleekButtonState sleekButtonState = MenuWorkshopSubmitUI.typeState;

            if (MenuWorkshopSubmitUI.< > f__mg$cache3 == null)
            {
                MenuWorkshopSubmitUI.< > f__mg$cache3 = new SwappedState(MenuWorkshopSubmitUI.onSwappedTypeState);
            }
            sleekButtonState.onSwappedState = MenuWorkshopSubmitUI.< > f__mg$cache3;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.typeState);
            MenuWorkshopSubmitUI.mapTypeState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Map_Type_Survival")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Map_Type_Horde")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Map_Type_Arena"))
            });
            MenuWorkshopSubmitUI.mapTypeState.positionOffset_X = 5;
            MenuWorkshopSubmitUI.mapTypeState.positionOffset_Y = 300;
            MenuWorkshopSubmitUI.mapTypeState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.mapTypeState.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.mapTypeState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.mapTypeState);
            MenuWorkshopSubmitUI.mapTypeState.isVisible = true;
            MenuWorkshopSubmitUI.itemTypeState          = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Backpack")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Barrel")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Barricade")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Fisher")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Food")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Fuel")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Glasses")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Grip")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Grower")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Gun")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Hat")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Magazine")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Mask")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Medical")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Melee")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Optic")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Shirt")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Sight")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Structure")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Supply")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Tactical")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Throwable")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Tool")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Vest")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Item_Type_Water"))
            });
            MenuWorkshopSubmitUI.itemTypeState.positionOffset_X = 5;
            MenuWorkshopSubmitUI.itemTypeState.positionOffset_Y = 300;
            MenuWorkshopSubmitUI.itemTypeState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.itemTypeState.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.itemTypeState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.itemTypeState);
            MenuWorkshopSubmitUI.itemTypeState.isVisible = false;
            MenuWorkshopSubmitUI.vehicleTypeState        = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Vehicle_Type_Wheels_2")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Vehicle_Type_Wheels_4")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Vehicle_Type_Plane")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Vehicle_Type_Helicopter")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Vehicle_Type_Boat"))
            });
            MenuWorkshopSubmitUI.vehicleTypeState.positionOffset_X = 5;
            MenuWorkshopSubmitUI.vehicleTypeState.positionOffset_Y = 300;
            MenuWorkshopSubmitUI.vehicleTypeState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.vehicleTypeState.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.vehicleTypeState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.vehicleTypeState);
            MenuWorkshopSubmitUI.vehicleTypeState.isVisible = false;
            MenuWorkshopSubmitUI.skinTypeState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Generic_Pattern")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Ace")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Augewehr")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Avenger")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Bluntforce")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Bulldog")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Butterfly_Knife")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Calling_Card")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Cobra")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Colt")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Compound_Bow")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Crossbow")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Desert_Falcon")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Dragonfang")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Eaglefire")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Ekho")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Fusilaut")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Grizzly")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Hawkhound")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Heartbreaker")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Hell_Fury")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Honeybadger")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Katana")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Kryzkarek")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Machete")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Maplestrike")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Masterkey")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Matamorez")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Military_Knife")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Nightraider")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Nykorev")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Peacemaker")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Rocket_Launcher")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Sabertooth")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Scalar")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Schofield")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Shadowstalker")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Snayperskya")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Sportshot")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Teklowvka")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Timberwolf")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Viper")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Vonya")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Yuri")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Skin_Type_Zubeknakov"))
            });
            MenuWorkshopSubmitUI.skinTypeState.positionOffset_X = 5;
            MenuWorkshopSubmitUI.skinTypeState.positionOffset_Y = 300;
            MenuWorkshopSubmitUI.skinTypeState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.skinTypeState.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.skinTypeState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.skinTypeState);
            MenuWorkshopSubmitUI.skinTypeState.isVisible = false;
            MenuWorkshopSubmitUI.objectTypeState         = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Object_Type_Model")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Object_Type_Resource")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Object_Type_Effect")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Object_Type_Animal"))
            });
            MenuWorkshopSubmitUI.objectTypeState.positionOffset_X = 5;
            MenuWorkshopSubmitUI.objectTypeState.positionOffset_Y = 300;
            MenuWorkshopSubmitUI.objectTypeState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.objectTypeState.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.objectTypeState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.objectTypeState);
            MenuWorkshopSubmitUI.objectTypeState.isVisible = false;
            MenuWorkshopSubmitUI.visibilityState           = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Public")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Friends_Only")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Private"))
            });
            MenuWorkshopSubmitUI.visibilityState.positionOffset_X = -200;
            MenuWorkshopSubmitUI.visibilityState.positionOffset_Y = 340;
            MenuWorkshopSubmitUI.visibilityState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.visibilityState.sizeOffset_X     = 200;
            MenuWorkshopSubmitUI.visibilityState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.visibilityState);
            MenuWorkshopSubmitUI.forState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Community")),
                new GUIContent(MenuWorkshopSubmitUI.localization.format("Review"))
            });
            MenuWorkshopSubmitUI.forState.positionOffset_X = -200;
            MenuWorkshopSubmitUI.forState.positionOffset_Y = 380;
            MenuWorkshopSubmitUI.forState.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.forState.sizeOffset_X     = 200;
            MenuWorkshopSubmitUI.forState.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.forState);
            MenuWorkshopSubmitUI.createButton = new SleekButtonIcon((Texture2D)bundle.load("Create"));
            MenuWorkshopSubmitUI.createButton.positionOffset_X = -200;
            MenuWorkshopSubmitUI.createButton.positionOffset_Y = 420;
            MenuWorkshopSubmitUI.createButton.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.createButton.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.createButton.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.createButton.text             = MenuWorkshopSubmitUI.localization.format("Create_Button");
            MenuWorkshopSubmitUI.createButton.tooltip          = MenuWorkshopSubmitUI.localization.format("Create_Button_Tooltip");
            SleekButton sleekButton = MenuWorkshopSubmitUI.createButton;

            if (MenuWorkshopSubmitUI.< > f__mg$cache4 == null)
            {
                MenuWorkshopSubmitUI.< > f__mg$cache4 = new ClickedButton(MenuWorkshopSubmitUI.onClickedCreateButton);
            }
            sleekButton.onClickedButton = MenuWorkshopSubmitUI.< > f__mg$cache4;
            MenuWorkshopSubmitUI.createButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.createButton);
            MenuWorkshopSubmitUI.legalButton = new SleekButton();
            MenuWorkshopSubmitUI.legalButton.positionOffset_X = 5;
            MenuWorkshopSubmitUI.legalButton.positionOffset_Y = 420;
            MenuWorkshopSubmitUI.legalButton.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.legalButton.sizeOffset_X     = 195;
            MenuWorkshopSubmitUI.legalButton.sizeOffset_Y     = 30;
            MenuWorkshopSubmitUI.legalButton.fontSize         = 10;
            MenuWorkshopSubmitUI.legalButton.text             = MenuWorkshopSubmitUI.localization.format("Legal_Button");
            MenuWorkshopSubmitUI.legalButton.tooltip          = MenuWorkshopSubmitUI.localization.format("Legal_Button_Tooltip");
            SleekButton sleekButton2 = MenuWorkshopSubmitUI.legalButton;

            if (MenuWorkshopSubmitUI.< > f__mg$cache5 == null)
            {
                MenuWorkshopSubmitUI.< > f__mg$cache5 = new ClickedButton(MenuWorkshopSubmitUI.onClickedLegalButton);
            }
            sleekButton2.onClickedButton = MenuWorkshopSubmitUI.< > f__mg$cache5;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.legalButton);
            MenuWorkshopSubmitUI.publishedBox = new SleekScrollBox();
            MenuWorkshopSubmitUI.publishedBox.positionOffset_X = -200;
            MenuWorkshopSubmitUI.publishedBox.positionOffset_Y = 460;
            MenuWorkshopSubmitUI.publishedBox.positionScale_X  = 0.5f;
            MenuWorkshopSubmitUI.publishedBox.sizeOffset_X     = 430;
            MenuWorkshopSubmitUI.publishedBox.sizeOffset_Y     = -460;
            MenuWorkshopSubmitUI.publishedBox.sizeScale_Y      = 1f;
            MenuWorkshopSubmitUI.publishedBox.area             = new Rect(0f, 0f, 5f, 0f);
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.publishedBox);
            MenuWorkshopSubmitUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuWorkshopSubmitUI.backButton.positionOffset_Y = -50;
            MenuWorkshopSubmitUI.backButton.positionScale_Y  = 1f;
            MenuWorkshopSubmitUI.backButton.sizeOffset_X     = 200;
            MenuWorkshopSubmitUI.backButton.sizeOffset_Y     = 50;
            MenuWorkshopSubmitUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuWorkshopSubmitUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton3 = MenuWorkshopSubmitUI.backButton;

            if (MenuWorkshopSubmitUI.< > f__mg$cache6 == null)
            {
                MenuWorkshopSubmitUI.< > f__mg$cache6 = new ClickedButton(MenuWorkshopSubmitUI.onClickedBackButton);
            }
            sleekButton3.onClickedButton             = MenuWorkshopSubmitUI.< > f__mg$cache6;
            MenuWorkshopSubmitUI.backButton.fontSize = 14;
            MenuWorkshopSubmitUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopSubmitUI.container.add(MenuWorkshopSubmitUI.backButton);
            MenuWorkshopSubmitUI.onPublishedAdded();
            bundle.unload();
        }
        // Token: 0x060035C5 RID: 13765 RVA: 0x00169D8C File Offset: 0x0016818C
        public EditorTerrainResourcesUI()
        {
            Local  local  = Localization.read("/Editor/EditorTerrainResources.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrainResources/EditorTerrainResources.unity3d");

            EditorTerrainResourcesUI.container = new Sleek();
            EditorTerrainResourcesUI.container.positionOffset_X = 10;
            EditorTerrainResourcesUI.container.positionOffset_Y = 10;
            EditorTerrainResourcesUI.container.positionScale_X  = 1f;
            EditorTerrainResourcesUI.container.sizeOffset_X     = -20;
            EditorTerrainResourcesUI.container.sizeOffset_Y     = -20;
            EditorTerrainResourcesUI.container.sizeScale_X      = 1f;
            EditorTerrainResourcesUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorTerrainResourcesUI.container);
            EditorTerrainResourcesUI.active             = false;
            EditorTerrainResourcesUI.resourcesScrollBox = new SleekScrollBox();
            EditorTerrainResourcesUI.resourcesScrollBox.positionOffset_Y = 120;
            EditorTerrainResourcesUI.resourcesScrollBox.positionOffset_X = -400;
            EditorTerrainResourcesUI.resourcesScrollBox.positionScale_X  = 1f;
            EditorTerrainResourcesUI.resourcesScrollBox.sizeOffset_X     = 400;
            EditorTerrainResourcesUI.resourcesScrollBox.sizeOffset_Y     = -240;
            EditorTerrainResourcesUI.resourcesScrollBox.sizeScale_Y      = 1f;
            EditorTerrainResourcesUI.resourcesScrollBox.area             = new Rect(0f, 0f, 5f, (float)(LevelGround.resources.Length * 40 + 400));
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.resourcesScrollBox);
            for (int i = 0; i < LevelGround.resources.Length; i++)
            {
                ResourceAsset resourceAsset = (ResourceAsset)Assets.find(EAssetType.RESOURCE, LevelGround.resources[i].id);
                SleekButton   sleekButton   = new SleekButton();
                sleekButton.positionOffset_X = 200;
                sleekButton.positionOffset_Y = i * 40;
                sleekButton.sizeOffset_X     = 170;
                sleekButton.sizeOffset_Y     = 30;
                if (resourceAsset != null)
                {
                    sleekButton.text = resourceAsset.resourceName;
                }
                SleekButton sleekButton2 = sleekButton;
                if (EditorTerrainResourcesUI.< > f__mg$cache0 == null)
                {
                    EditorTerrainResourcesUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainResourcesUI.onClickedResourceButton);
                }
                sleekButton2.onClickedButton = EditorTerrainResourcesUI.< > f__mg$cache0;
                EditorTerrainResourcesUI.resourcesScrollBox.add(sleekButton);
            }
            EditorTerrainResourcesUI.densitySlider = new SleekSlider();
            EditorTerrainResourcesUI.densitySlider.positionOffset_X = 200;
            EditorTerrainResourcesUI.densitySlider.positionOffset_Y = LevelGround.resources.Length * 40;
            EditorTerrainResourcesUI.densitySlider.sizeOffset_X     = 170;
            EditorTerrainResourcesUI.densitySlider.sizeOffset_Y     = 20;
            EditorTerrainResourcesUI.densitySlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainResourcesUI.densitySlider.addLabel(local.format("DensitySliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider = EditorTerrainResourcesUI.densitySlider;

            if (EditorTerrainResourcesUI.< > f__mg$cache1 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache1 = new Dragged(EditorTerrainResourcesUI.onDraggedDensitySlider);
            }
            sleekSlider.onDragged = EditorTerrainResourcesUI.< > f__mg$cache1;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.densitySlider);
            EditorTerrainResourcesUI.chanceSlider = new SleekSlider();
            EditorTerrainResourcesUI.chanceSlider.positionOffset_X = 200;
            EditorTerrainResourcesUI.chanceSlider.positionOffset_Y = LevelGround.resources.Length * 40 + 30;
            EditorTerrainResourcesUI.chanceSlider.sizeOffset_X     = 170;
            EditorTerrainResourcesUI.chanceSlider.sizeOffset_Y     = 20;
            EditorTerrainResourcesUI.chanceSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainResourcesUI.chanceSlider.addLabel(local.format("ChanceSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider2 = EditorTerrainResourcesUI.chanceSlider;

            if (EditorTerrainResourcesUI.< > f__mg$cache2 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache2 = new Dragged(EditorTerrainResourcesUI.onDraggedChanceSlider);
            }
            sleekSlider2.onDragged = EditorTerrainResourcesUI.< > f__mg$cache2;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.chanceSlider);
            EditorTerrainResourcesUI.tree_0_Toggle = new SleekToggle();
            EditorTerrainResourcesUI.tree_0_Toggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.tree_0_Toggle.positionOffset_Y = LevelGround.resources.Length * 40 + 60;
            EditorTerrainResourcesUI.tree_0_Toggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.tree_0_Toggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.tree_0_Toggle.addLabel(local.format("Tree_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = EditorTerrainResourcesUI.tree_0_Toggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache3 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache3 = new Toggled(EditorTerrainResourcesUI.onToggledTree_0_Toggle);
            }
            sleekToggle.onToggled = EditorTerrainResourcesUI.< > f__mg$cache3;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.tree_0_Toggle);
            EditorTerrainResourcesUI.tree_1_Toggle = new SleekToggle();
            EditorTerrainResourcesUI.tree_1_Toggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.tree_1_Toggle.positionOffset_Y = LevelGround.resources.Length * 40 + 110;
            EditorTerrainResourcesUI.tree_1_Toggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.tree_1_Toggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.tree_1_Toggle.addLabel(local.format("Tree_1_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = EditorTerrainResourcesUI.tree_1_Toggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache4 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache4 = new Toggled(EditorTerrainResourcesUI.onToggledTree_1_Toggle);
            }
            sleekToggle2.onToggled = EditorTerrainResourcesUI.< > f__mg$cache4;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.tree_1_Toggle);
            EditorTerrainResourcesUI.flower_0_Toggle = new SleekToggle();
            EditorTerrainResourcesUI.flower_0_Toggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.flower_0_Toggle.positionOffset_Y = LevelGround.resources.Length * 40 + 160;
            EditorTerrainResourcesUI.flower_0_Toggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.flower_0_Toggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.flower_0_Toggle.addLabel(local.format("Flower_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle3 = EditorTerrainResourcesUI.flower_0_Toggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache5 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache5 = new Toggled(EditorTerrainResourcesUI.onToggledFlower_0_Toggle);
            }
            sleekToggle3.onToggled = EditorTerrainResourcesUI.< > f__mg$cache5;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.flower_0_Toggle);
            EditorTerrainResourcesUI.flower_1_Toggle = new SleekToggle();
            EditorTerrainResourcesUI.flower_1_Toggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.flower_1_Toggle.positionOffset_Y = LevelGround.resources.Length * 40 + 210;
            EditorTerrainResourcesUI.flower_1_Toggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.flower_1_Toggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.flower_1_Toggle.addLabel(local.format("Flower_1_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle4 = EditorTerrainResourcesUI.flower_1_Toggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache6 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache6 = new Toggled(EditorTerrainResourcesUI.onToggledFlower_1_Toggle);
            }
            sleekToggle4.onToggled = EditorTerrainResourcesUI.< > f__mg$cache6;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.flower_1_Toggle);
            EditorTerrainResourcesUI.rockToggle = new SleekToggle();
            EditorTerrainResourcesUI.rockToggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.rockToggle.positionOffset_Y = LevelGround.resources.Length * 40 + 260;
            EditorTerrainResourcesUI.rockToggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.rockToggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.rockToggle.addLabel(local.format("RockToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle5 = EditorTerrainResourcesUI.rockToggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache7 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache7 = new Toggled(EditorTerrainResourcesUI.onToggledRockToggle);
            }
            sleekToggle5.onToggled = EditorTerrainResourcesUI.< > f__mg$cache7;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.rockToggle);
            EditorTerrainResourcesUI.roadToggle = new SleekToggle();
            EditorTerrainResourcesUI.roadToggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.roadToggle.positionOffset_Y = LevelGround.resources.Length * 40 + 310;
            EditorTerrainResourcesUI.roadToggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.roadToggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.roadToggle.addLabel(local.format("RoadToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle6 = EditorTerrainResourcesUI.roadToggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache8 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache8 = new Toggled(EditorTerrainResourcesUI.onToggledRoadToggle);
            }
            sleekToggle6.onToggled = EditorTerrainResourcesUI.< > f__mg$cache8;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.roadToggle);
            EditorTerrainResourcesUI.snowToggle = new SleekToggle();
            EditorTerrainResourcesUI.snowToggle.positionOffset_X = 200;
            EditorTerrainResourcesUI.snowToggle.positionOffset_Y = LevelGround.resources.Length * 40 + 360;
            EditorTerrainResourcesUI.snowToggle.sizeOffset_X     = 40;
            EditorTerrainResourcesUI.snowToggle.sizeOffset_Y     = 40;
            EditorTerrainResourcesUI.snowToggle.addLabel(local.format("SnowToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle7 = EditorTerrainResourcesUI.snowToggle;

            if (EditorTerrainResourcesUI.< > f__mg$cache9 == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cache9 = new Toggled(EditorTerrainResourcesUI.onToggledSnowToggle);
            }
            sleekToggle7.onToggled = EditorTerrainResourcesUI.< > f__mg$cache9;
            EditorTerrainResourcesUI.resourcesScrollBox.add(EditorTerrainResourcesUI.snowToggle);
            EditorTerrainResourcesUI.selectedBox = new SleekBox();
            EditorTerrainResourcesUI.selectedBox.positionOffset_X = -200;
            EditorTerrainResourcesUI.selectedBox.positionOffset_Y = 80;
            EditorTerrainResourcesUI.selectedBox.positionScale_X  = 1f;
            EditorTerrainResourcesUI.selectedBox.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.selectedBox.sizeOffset_Y     = 30;
            EditorTerrainResourcesUI.selectedBox.addLabel(local.format("SelectionBoxLabelText"), ESleekSide.LEFT);
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.selectedBox);
            EditorTerrainResourcesUI.updateSelection();
            EditorTerrainResourcesUI.bakeGlobalResourcesButton = new SleekButtonIcon((Texture2D)bundle.load("Resources"));
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.positionOffset_X = -200;
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.positionOffset_Y = -110;
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.positionScale_X  = 1f;
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.positionScale_Y  = 1f;
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.sizeOffset_Y     = 30;
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.text             = local.format("BakeGlobalResourcesButtonText");
            EditorTerrainResourcesUI.bakeGlobalResourcesButton.tooltip          = local.format("BakeGlobalResourcesButtonTooltip");
            SleekButton sleekButton3 = EditorTerrainResourcesUI.bakeGlobalResourcesButton;

            if (EditorTerrainResourcesUI.< > f__mg$cacheA == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cacheA = new ClickedButton(EditorTerrainResourcesUI.onClickedBakeGlobalResourcesButton);
            }
            sleekButton3.onClickedButton = EditorTerrainResourcesUI.< > f__mg$cacheA;
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.bakeGlobalResourcesButton);
            EditorTerrainResourcesUI.bakeLocalResourcesButton = new SleekButtonIcon((Texture2D)bundle.load("Resources"));
            EditorTerrainResourcesUI.bakeLocalResourcesButton.positionOffset_X = -200;
            EditorTerrainResourcesUI.bakeLocalResourcesButton.positionOffset_Y = -70;
            EditorTerrainResourcesUI.bakeLocalResourcesButton.positionScale_X  = 1f;
            EditorTerrainResourcesUI.bakeLocalResourcesButton.positionScale_Y  = 1f;
            EditorTerrainResourcesUI.bakeLocalResourcesButton.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.bakeLocalResourcesButton.sizeOffset_Y     = 30;
            EditorTerrainResourcesUI.bakeLocalResourcesButton.text             = local.format("BakeLocalResourcesButtonText");
            EditorTerrainResourcesUI.bakeLocalResourcesButton.tooltip          = local.format("BakeLocalResourcesButtonTooltip");
            SleekButton sleekButton4 = EditorTerrainResourcesUI.bakeLocalResourcesButton;

            if (EditorTerrainResourcesUI.< > f__mg$cacheB == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cacheB = new ClickedButton(EditorTerrainResourcesUI.onClickedBakeLocalResourcesButton);
            }
            sleekButton4.onClickedButton = EditorTerrainResourcesUI.< > f__mg$cacheB;
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.bakeLocalResourcesButton);
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton = new SleekButtonIcon((Texture2D)bundle.load("Resources"));
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.positionOffset_X = -200;
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.positionOffset_Y = -30;
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.positionScale_X  = 1f;
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.positionScale_Y  = 1f;
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.sizeOffset_Y     = 30;
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.text             = local.format("BakeSkyboxResourcesButtonText");
            EditorTerrainResourcesUI.bakeSkyboxResourcesButton.tooltip          = local.format("BakeSkyboxResourcesButtonTooltip");
            SleekButton sleekButton5 = EditorTerrainResourcesUI.bakeSkyboxResourcesButton;

            if (EditorTerrainResourcesUI.< > f__mg$cacheC == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cacheC = new ClickedButton(EditorTerrainResourcesUI.onClickedBakeSkyboxResourcesButton);
            }
            sleekButton5.onClickedButton = EditorTerrainResourcesUI.< > f__mg$cacheC;
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.bakeSkyboxResourcesButton);
            EditorTerrainResourcesUI.radiusSlider = new SleekSlider();
            EditorTerrainResourcesUI.radiusSlider.positionOffset_Y = -100;
            EditorTerrainResourcesUI.radiusSlider.positionScale_Y  = 1f;
            EditorTerrainResourcesUI.radiusSlider.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.radiusSlider.sizeOffset_Y     = 20;
            EditorTerrainResourcesUI.radiusSlider.state            = (float)(EditorSpawns.radius - EditorSpawns.MIN_REMOVE_SIZE) / (float)EditorSpawns.MAX_REMOVE_SIZE;
            EditorTerrainResourcesUI.radiusSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainResourcesUI.radiusSlider.addLabel(local.format("RadiusSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider3 = EditorTerrainResourcesUI.radiusSlider;

            if (EditorTerrainResourcesUI.< > f__mg$cacheD == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cacheD = new Dragged(EditorTerrainResourcesUI.onDraggedRadiusSlider);
            }
            sleekSlider3.onDragged = EditorTerrainResourcesUI.< > f__mg$cacheD;
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.radiusSlider);
            EditorTerrainResourcesUI.addButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorTerrainResourcesUI.addButton.positionOffset_Y = -70;
            EditorTerrainResourcesUI.addButton.positionScale_Y  = 1f;
            EditorTerrainResourcesUI.addButton.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.addButton.sizeOffset_Y     = 30;
            EditorTerrainResourcesUI.addButton.text             = local.format("AddButtonText", new object[]
            {
                ControlsSettings.tool_0
            });
            EditorTerrainResourcesUI.addButton.tooltip = local.format("AddButtonTooltip");
            SleekButton sleekButton6 = EditorTerrainResourcesUI.addButton;

            if (EditorTerrainResourcesUI.< > f__mg$cacheE == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cacheE = new ClickedButton(EditorTerrainResourcesUI.onClickedAddButton);
            }
            sleekButton6.onClickedButton = EditorTerrainResourcesUI.< > f__mg$cacheE;
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.addButton);
            EditorTerrainResourcesUI.removeButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorTerrainResourcesUI.removeButton.positionOffset_Y = -30;
            EditorTerrainResourcesUI.removeButton.positionScale_Y  = 1f;
            EditorTerrainResourcesUI.removeButton.sizeOffset_X     = 200;
            EditorTerrainResourcesUI.removeButton.sizeOffset_Y     = 30;
            EditorTerrainResourcesUI.removeButton.text             = local.format("RemoveButtonText", new object[]
            {
                ControlsSettings.tool_1
            });
            EditorTerrainResourcesUI.removeButton.tooltip = local.format("RemoveButtonTooltip");
            SleekButton sleekButton7 = EditorTerrainResourcesUI.removeButton;

            if (EditorTerrainResourcesUI.< > f__mg$cacheF == null)
            {
                EditorTerrainResourcesUI.< > f__mg$cacheF = new ClickedButton(EditorTerrainResourcesUI.onClickedRemoveButton);
            }
            sleekButton7.onClickedButton = EditorTerrainResourcesUI.< > f__mg$cacheF;
            EditorTerrainResourcesUI.container.add(EditorTerrainResourcesUI.removeButton);
            bundle.unload();
        }
Example #20
0
        public EditorTerrainMaterialsUI()
        {
            Local  local  = Localization.read("/Editor/EditorTerrainMaterials.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrainMaterials/EditorTerrainMaterials.unity3d");

            EditorTerrainMaterialsUI.container = new Sleek();
            EditorTerrainMaterialsUI.container.positionOffset_X = 10;
            EditorTerrainMaterialsUI.container.positionOffset_Y = 10;
            EditorTerrainMaterialsUI.container.positionScale_X  = 1f;
            EditorTerrainMaterialsUI.container.sizeOffset_X     = -20;
            EditorTerrainMaterialsUI.container.sizeOffset_Y     = -20;
            EditorTerrainMaterialsUI.container.sizeScale_X      = 1f;
            EditorTerrainMaterialsUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorTerrainMaterialsUI.container);
            EditorTerrainMaterialsUI.active    = false;
            EditorTerrainMaterialsUI.wasOpened = false;
            if (LevelGround.materials == null)
            {
                return;
            }
            EditorTerrainMaterialsUI.materialScrollBox = new SleekScrollBox();
            EditorTerrainMaterialsUI.materialScrollBox.positionOffset_Y = 120;
            EditorTerrainMaterialsUI.materialScrollBox.positionOffset_X = -400;
            EditorTerrainMaterialsUI.materialScrollBox.positionScale_X  = 1f;
            EditorTerrainMaterialsUI.materialScrollBox.sizeOffset_X     = 400;
            EditorTerrainMaterialsUI.materialScrollBox.sizeOffset_Y     = -200;
            EditorTerrainMaterialsUI.materialScrollBox.sizeScale_Y      = 1f;
            EditorTerrainMaterialsUI.materialScrollBox.area             = new Rect(0f, 0f, 5f, (float)(LevelGround.materials.Length * 70 + 750));
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.materialScrollBox);
            for (int i = 0; i < LevelGround.materials.Length; i++)
            {
                SleekImageTexture sleekImageTexture = new SleekImageTexture();
                sleekImageTexture.positionOffset_X = 200;
                sleekImageTexture.positionOffset_Y = i * 70;
                sleekImageTexture.sizeOffset_X     = 64;
                sleekImageTexture.sizeOffset_Y     = 64;
                sleekImageTexture.texture          = LevelGround.materials[i].prototype.texture;
                EditorTerrainMaterialsUI.materialScrollBox.add(sleekImageTexture);
                SleekButton sleekButton = new SleekButton();
                sleekButton.positionOffset_X = 70;
                sleekButton.sizeOffset_X     = 100;
                sleekButton.sizeOffset_Y     = 64;
                sleekButton.text             = i + " " + LevelGround.materials[i].prototype.texture.name;
                SleekButton sleekButton2 = sleekButton;
                if (EditorTerrainMaterialsUI.< > f__mg$cache0 == null)
                {
                    EditorTerrainMaterialsUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainMaterialsUI.onClickedMaterialButton);
                }
                sleekButton2.onClickedButton = EditorTerrainMaterialsUI.< > f__mg$cache0;
                sleekImageTexture.add(sleekButton);
            }
            EditorTerrainMaterialsUI.overgrowthSlider = new SleekSlider();
            EditorTerrainMaterialsUI.overgrowthSlider.positionOffset_X = 200;
            EditorTerrainMaterialsUI.overgrowthSlider.positionOffset_Y = LevelGround.materials.Length * 70;
            EditorTerrainMaterialsUI.overgrowthSlider.sizeOffset_X     = 170;
            EditorTerrainMaterialsUI.overgrowthSlider.sizeOffset_Y     = 20;
            EditorTerrainMaterialsUI.overgrowthSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainMaterialsUI.overgrowthSlider.addLabel(local.format("OvergrowthSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider = EditorTerrainMaterialsUI.overgrowthSlider;

            if (EditorTerrainMaterialsUI.< > f__mg$cache1 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache1 = new Dragged(EditorTerrainMaterialsUI.onDraggedOvergrowthSlider);
            }
            sleekSlider.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache1;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.overgrowthSlider);
            EditorTerrainMaterialsUI.chanceSlider = new SleekSlider();
            EditorTerrainMaterialsUI.chanceSlider.positionOffset_X = 200;
            EditorTerrainMaterialsUI.chanceSlider.positionOffset_Y = LevelGround.materials.Length * 70 + 30;
            EditorTerrainMaterialsUI.chanceSlider.sizeOffset_X     = 170;
            EditorTerrainMaterialsUI.chanceSlider.sizeOffset_Y     = 20;
            EditorTerrainMaterialsUI.chanceSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainMaterialsUI.chanceSlider.addLabel(local.format("ChanceSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider2 = EditorTerrainMaterialsUI.chanceSlider;

            if (EditorTerrainMaterialsUI.< > f__mg$cache2 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache2 = new Dragged(EditorTerrainMaterialsUI.onDraggedChanceSlider);
            }
            sleekSlider2.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache2;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.chanceSlider);
            EditorTerrainMaterialsUI.steepnessSlider = new SleekSlider();
            EditorTerrainMaterialsUI.steepnessSlider.positionOffset_X = 200;
            EditorTerrainMaterialsUI.steepnessSlider.positionOffset_Y = LevelGround.materials.Length * 70 + 60;
            EditorTerrainMaterialsUI.steepnessSlider.sizeOffset_X     = 170;
            EditorTerrainMaterialsUI.steepnessSlider.sizeOffset_Y     = 20;
            EditorTerrainMaterialsUI.steepnessSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainMaterialsUI.steepnessSlider.addLabel(local.format("SteepnessFieldLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider3 = EditorTerrainMaterialsUI.steepnessSlider;

            if (EditorTerrainMaterialsUI.< > f__mg$cache3 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache3 = new Dragged(EditorTerrainMaterialsUI.onDraggedSteepnessSlider);
            }
            sleekSlider3.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache3;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.steepnessSlider);
            EditorTerrainMaterialsUI.transitionSlider = new SleekSlider();
            EditorTerrainMaterialsUI.transitionSlider.positionOffset_X = 200;
            EditorTerrainMaterialsUI.transitionSlider.positionOffset_Y = LevelGround.materials.Length * 70 + 90;
            EditorTerrainMaterialsUI.transitionSlider.sizeOffset_X     = 170;
            EditorTerrainMaterialsUI.transitionSlider.sizeOffset_Y     = 20;
            EditorTerrainMaterialsUI.transitionSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainMaterialsUI.transitionSlider.addLabel(local.format("TransitionSliderLabelText"), ESleekSide.LEFT);
            SleekSlider sleekSlider4 = EditorTerrainMaterialsUI.transitionSlider;

            if (EditorTerrainMaterialsUI.< > f__mg$cache4 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache4 = new Dragged(EditorTerrainMaterialsUI.onDraggedTransitionSlider);
            }
            sleekSlider4.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache4;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.transitionSlider);
            EditorTerrainMaterialsUI.heightValue = new SleekValue();
            EditorTerrainMaterialsUI.heightValue.positionOffset_X = 200;
            EditorTerrainMaterialsUI.heightValue.positionOffset_Y = LevelGround.materials.Length * 70 + 120;
            EditorTerrainMaterialsUI.heightValue.sizeOffset_X     = 170;
            EditorTerrainMaterialsUI.heightValue.sizeOffset_Y     = 30;
            EditorTerrainMaterialsUI.heightValue.addLabel(local.format("HeightValueLabelText"), ESleekSide.LEFT);
            SleekValue sleekValue = EditorTerrainMaterialsUI.heightValue;

            if (EditorTerrainMaterialsUI.< > f__mg$cache5 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache5 = new Valued(EditorTerrainMaterialsUI.onValuedHeightValue);
            }
            sleekValue.onValued = EditorTerrainMaterialsUI.< > f__mg$cache5;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.heightValue);
            EditorTerrainMaterialsUI.grassy_0_Toggle = new SleekToggle();
            EditorTerrainMaterialsUI.grassy_0_Toggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.grassy_0_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 160;
            EditorTerrainMaterialsUI.grassy_0_Toggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.grassy_0_Toggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.grassy_0_Toggle.addLabel(local.format("Grassy_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle = EditorTerrainMaterialsUI.grassy_0_Toggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache6 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache6 = new Toggled(EditorTerrainMaterialsUI.onToggledGrassy_0_Toggle);
            }
            sleekToggle.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache6;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.grassy_0_Toggle);
            EditorTerrainMaterialsUI.grassy_1_Toggle = new SleekToggle();
            EditorTerrainMaterialsUI.grassy_1_Toggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.grassy_1_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 210;
            EditorTerrainMaterialsUI.grassy_1_Toggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.grassy_1_Toggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.grassy_1_Toggle.addLabel(local.format("Grassy_1_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle2 = EditorTerrainMaterialsUI.grassy_1_Toggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache7 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache7 = new Toggled(EditorTerrainMaterialsUI.onToggledGrassy_1_Toggle);
            }
            sleekToggle2.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache7;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.grassy_1_Toggle);
            EditorTerrainMaterialsUI.flowery_0_Toggle = new SleekToggle();
            EditorTerrainMaterialsUI.flowery_0_Toggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.flowery_0_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 260;
            EditorTerrainMaterialsUI.flowery_0_Toggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.flowery_0_Toggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.flowery_0_Toggle.addLabel(local.format("Flowery_0_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle3 = EditorTerrainMaterialsUI.flowery_0_Toggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache8 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache8 = new Toggled(EditorTerrainMaterialsUI.onToggledFlowery_0_Toggle);
            }
            sleekToggle3.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache8;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.flowery_0_Toggle);
            EditorTerrainMaterialsUI.flowery_1_Toggle = new SleekToggle();
            EditorTerrainMaterialsUI.flowery_1_Toggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.flowery_1_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 310;
            EditorTerrainMaterialsUI.flowery_1_Toggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.flowery_1_Toggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.flowery_1_Toggle.addLabel(local.format("Flowery_1_ToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle4 = EditorTerrainMaterialsUI.flowery_1_Toggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache9 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache9 = new Toggled(EditorTerrainMaterialsUI.onToggledFlowery_1_Toggle);
            }
            sleekToggle4.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache9;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.flowery_1_Toggle);
            EditorTerrainMaterialsUI.rockyToggle = new SleekToggle();
            EditorTerrainMaterialsUI.rockyToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.rockyToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 360;
            EditorTerrainMaterialsUI.rockyToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.rockyToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.rockyToggle.addLabel(local.format("RockyToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle5 = EditorTerrainMaterialsUI.rockyToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cacheA == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cacheA = new Toggled(EditorTerrainMaterialsUI.onToggledRockyToggle);
            }
            sleekToggle5.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheA;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.rockyToggle);
            EditorTerrainMaterialsUI.roadToggle = new SleekToggle();
            EditorTerrainMaterialsUI.roadToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.roadToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 410;
            EditorTerrainMaterialsUI.roadToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.roadToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.roadToggle.addLabel(local.format("RoadToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle6 = EditorTerrainMaterialsUI.roadToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cacheB == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cacheB = new Toggled(EditorTerrainMaterialsUI.onToggledRoadToggle);
            }
            sleekToggle6.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheB;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.roadToggle);
            EditorTerrainMaterialsUI.snowyToggle = new SleekToggle();
            EditorTerrainMaterialsUI.snowyToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.snowyToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 460;
            EditorTerrainMaterialsUI.snowyToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.snowyToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.snowyToggle.addLabel(local.format("SnowyToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle7 = EditorTerrainMaterialsUI.snowyToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cacheC == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cacheC = new Toggled(EditorTerrainMaterialsUI.onToggledSnowyToggle);
            }
            sleekToggle7.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheC;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.snowyToggle);
            EditorTerrainMaterialsUI.foundationToggle = new SleekToggle();
            EditorTerrainMaterialsUI.foundationToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.foundationToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 510;
            EditorTerrainMaterialsUI.foundationToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.foundationToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.foundationToggle.addLabel(local.format("FoundationToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle8 = EditorTerrainMaterialsUI.foundationToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cacheD == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cacheD = new Toggled(EditorTerrainMaterialsUI.onToggledFoundationToggle);
            }
            sleekToggle8.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheD;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.foundationToggle);
            EditorTerrainMaterialsUI.manualToggle = new SleekToggle();
            EditorTerrainMaterialsUI.manualToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.manualToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 560;
            EditorTerrainMaterialsUI.manualToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.manualToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.manualToggle.addLabel(local.format("ManualToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle9 = EditorTerrainMaterialsUI.manualToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cacheE == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cacheE = new Toggled(EditorTerrainMaterialsUI.onToggledManualToggle);
            }
            sleekToggle9.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheE;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.manualToggle);
            EditorTerrainMaterialsUI.steepnessToggle = new SleekToggle();
            EditorTerrainMaterialsUI.steepnessToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.steepnessToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 610;
            EditorTerrainMaterialsUI.steepnessToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.steepnessToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.steepnessToggle.addLabel(local.format("SteepnessToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle10 = EditorTerrainMaterialsUI.steepnessToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cacheF == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cacheF = new Toggled(EditorTerrainMaterialsUI.onToggledSteepnessToggle);
            }
            sleekToggle10.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheF;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.steepnessToggle);
            EditorTerrainMaterialsUI.heightToggle = new SleekToggle();
            EditorTerrainMaterialsUI.heightToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.heightToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 660;
            EditorTerrainMaterialsUI.heightToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.heightToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.heightToggle.addLabel(local.format("HeightToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle11 = EditorTerrainMaterialsUI.heightToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache10 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache10 = new Toggled(EditorTerrainMaterialsUI.onToggledHeightToggle);
            }
            sleekToggle11.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache10;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.heightToggle);
            EditorTerrainMaterialsUI.footprintToggle = new SleekToggle();
            EditorTerrainMaterialsUI.footprintToggle.positionOffset_X = 200;
            EditorTerrainMaterialsUI.footprintToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 710;
            EditorTerrainMaterialsUI.footprintToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.footprintToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.footprintToggle.addLabel(local.format("FootprintToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle12 = EditorTerrainMaterialsUI.footprintToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache11 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache11 = new Toggled(EditorTerrainMaterialsUI.onToggledFootprintToggle);
            }
            sleekToggle12.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache11;
            EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.footprintToggle);
            EditorTerrainMaterialsUI.selectedBox = new SleekBox();
            EditorTerrainMaterialsUI.selectedBox.positionOffset_X = -200;
            EditorTerrainMaterialsUI.selectedBox.positionOffset_Y = 80;
            EditorTerrainMaterialsUI.selectedBox.positionScale_X  = 1f;
            EditorTerrainMaterialsUI.selectedBox.sizeOffset_X     = 200;
            EditorTerrainMaterialsUI.selectedBox.sizeOffset_Y     = 30;
            EditorTerrainMaterialsUI.selectedBox.addLabel(local.format("SelectionBoxLabelText"), ESleekSide.LEFT);
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.selectedBox);
            EditorTerrainMaterialsUI.updateSelection();
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton = new SleekButtonIcon((Texture2D)bundle.load("Materials"));
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionOffset_X = -200;
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionOffset_Y = -70;
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionScale_X  = 1f;
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionScale_Y  = 1f;
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.sizeOffset_X     = 200;
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.sizeOffset_Y     = 30;
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.text             = local.format("BakeGlobalMaterialsButtonText");
            EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.tooltip          = local.format("BakeGlobalMaterialsButtonTooltip");
            SleekButton sleekButton3 = EditorTerrainMaterialsUI.bakeGlobalMaterialsButton;

            if (EditorTerrainMaterialsUI.< > f__mg$cache12 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache12 = new ClickedButton(EditorTerrainMaterialsUI.onClickedBakeGlobalMaterialsButton);
            }
            sleekButton3.onClickedButton = EditorTerrainMaterialsUI.< > f__mg$cache12;
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.bakeGlobalMaterialsButton);
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton = new SleekButtonIcon((Texture2D)bundle.load("Materials"));
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionOffset_X = -200;
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionOffset_Y = -30;
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionScale_X  = 1f;
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionScale_Y  = 1f;
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.sizeOffset_X     = 200;
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.sizeOffset_Y     = 30;
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.text             = local.format("BakeLocalMaterialsButtonText");
            EditorTerrainMaterialsUI.bakeLocalMaterialsButton.tooltip          = local.format("BakeLocalMaterialsButtonTooltip");
            SleekButton sleekButton4 = EditorTerrainMaterialsUI.bakeLocalMaterialsButton;

            if (EditorTerrainMaterialsUI.< > f__mg$cache13 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache13 = new ClickedButton(EditorTerrainMaterialsUI.onClickedBakeLocalMaterialsButton);
            }
            sleekButton4.onClickedButton = EditorTerrainMaterialsUI.< > f__mg$cache13;
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.bakeLocalMaterialsButton);
            EditorTerrainMaterialsUI.map2Button = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(local.format("Map2ButtonText1")),
                new GUIContent(local.format("Map2ButtonText2"))
            });
            EditorTerrainMaterialsUI.map2Button.positionOffset_Y = -30;
            EditorTerrainMaterialsUI.map2Button.positionScale_Y  = 1f;
            EditorTerrainMaterialsUI.map2Button.sizeOffset_X     = 200;
            EditorTerrainMaterialsUI.map2Button.sizeOffset_Y     = 30;
            EditorTerrainMaterialsUI.map2Button.tooltip          = local.format("Map2ButtonTooltip");
            SleekButtonState sleekButtonState = EditorTerrainMaterialsUI.map2Button;

            if (EditorTerrainMaterialsUI.< > f__mg$cache14 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache14 = new SwappedState(EditorTerrainMaterialsUI.onSwappedMap2);
            }
            sleekButtonState.onSwappedState = EditorTerrainMaterialsUI.< > f__mg$cache14;
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.map2Button);
            EditorTerrainMaterialsUI.sizeSlider = new SleekSlider();
            EditorTerrainMaterialsUI.sizeSlider.positionOffset_Y = -60;
            EditorTerrainMaterialsUI.sizeSlider.positionScale_Y  = 1f;
            EditorTerrainMaterialsUI.sizeSlider.sizeOffset_X     = 200;
            EditorTerrainMaterialsUI.sizeSlider.sizeOffset_Y     = 20;
            EditorTerrainMaterialsUI.sizeSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainMaterialsUI.sizeSlider.state            = (float)(EditorTerrainMaterials.brushSize - EditorTerrainMaterials.MIN_BRUSH_SIZE) / (float)EditorTerrainMaterials.MAX_BRUSH_SIZE;
            EditorTerrainMaterialsUI.sizeSlider.addLabel(local.format("SizeSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider5 = EditorTerrainMaterialsUI.sizeSlider;

            if (EditorTerrainMaterialsUI.< > f__mg$cache15 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache15 = new Dragged(EditorTerrainMaterialsUI.onDraggedSizeSlider);
            }
            sleekSlider5.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache15;
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.sizeSlider);
            EditorTerrainMaterialsUI.noiseSlider = new SleekSlider();
            EditorTerrainMaterialsUI.noiseSlider.positionOffset_Y = -90;
            EditorTerrainMaterialsUI.noiseSlider.positionScale_Y  = 1f;
            EditorTerrainMaterialsUI.noiseSlider.sizeOffset_X     = 200;
            EditorTerrainMaterialsUI.noiseSlider.sizeOffset_Y     = 20;
            EditorTerrainMaterialsUI.noiseSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainMaterialsUI.noiseSlider.state            = EditorTerrainMaterials.brushNoise;
            EditorTerrainMaterialsUI.noiseSlider.addLabel(local.format("NoiseSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider6 = EditorTerrainMaterialsUI.noiseSlider;

            if (EditorTerrainMaterialsUI.< > f__mg$cache16 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache16 = new Dragged(EditorTerrainMaterialsUI.onDraggedNoiseSlider);
            }
            sleekSlider6.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache16;
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.noiseSlider);
            EditorTerrainMaterialsUI.previewToggle = new SleekToggle();
            EditorTerrainMaterialsUI.previewToggle.positionOffset_Y = -140;
            EditorTerrainMaterialsUI.previewToggle.positionScale_Y  = 1f;
            EditorTerrainMaterialsUI.previewToggle.sizeOffset_X     = 40;
            EditorTerrainMaterialsUI.previewToggle.sizeOffset_Y     = 40;
            EditorTerrainMaterialsUI.previewToggle.addLabel(local.format("PreviewToggleLabelText"), ESleekSide.RIGHT);
            SleekToggle sleekToggle13 = EditorTerrainMaterialsUI.previewToggle;

            if (EditorTerrainMaterialsUI.< > f__mg$cache17 == null)
            {
                EditorTerrainMaterialsUI.< > f__mg$cache17 = new Toggled(EditorTerrainMaterialsUI.onToggledPreviewToggle);
            }
            sleekToggle13.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache17;
            EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.previewToggle);
            bundle.unload();
        }
Example #21
0
 // Token: 0x060038C2 RID: 14530 RVA: 0x0019EE14 File Offset: 0x0019D214
 public PlayerNPCDialogueUI()
 {
     if (PlayerNPCDialogueUI.icons != null)
     {
         PlayerNPCDialogueUI.icons.unload();
     }
     PlayerNPCDialogueUI.localization = Localization.read("/Player/PlayerNPCDialogue.dat");
     PlayerNPCDialogueUI.icons        = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerNPCDialogue/PlayerNPCDialogue.unity3d");
     PlayerNPCDialogueUI.container    = new Sleek();
     PlayerNPCDialogueUI.container.positionScale_Y  = 1f;
     PlayerNPCDialogueUI.container.positionOffset_X = 10;
     PlayerNPCDialogueUI.container.positionOffset_Y = 10;
     PlayerNPCDialogueUI.container.sizeOffset_X     = -20;
     PlayerNPCDialogueUI.container.sizeOffset_Y     = -20;
     PlayerNPCDialogueUI.container.sizeScale_X      = 1f;
     PlayerNPCDialogueUI.container.sizeScale_Y      = 1f;
     PlayerUI.container.add(PlayerNPCDialogueUI.container);
     PlayerNPCDialogueUI.active      = false;
     PlayerNPCDialogueUI.dialogueBox = new SleekBox();
     PlayerNPCDialogueUI.dialogueBox.positionOffset_X = -250;
     PlayerNPCDialogueUI.dialogueBox.positionOffset_Y = -200;
     PlayerNPCDialogueUI.dialogueBox.positionScale_X  = 0.5f;
     PlayerNPCDialogueUI.dialogueBox.positionScale_Y  = 0.85f;
     PlayerNPCDialogueUI.dialogueBox.sizeOffset_X     = 500;
     PlayerNPCDialogueUI.dialogueBox.sizeOffset_Y     = 100;
     PlayerNPCDialogueUI.container.add(PlayerNPCDialogueUI.dialogueBox);
     PlayerNPCDialogueUI.characterLabel = new SleekLabel();
     PlayerNPCDialogueUI.characterLabel.positionOffset_X = 5;
     PlayerNPCDialogueUI.characterLabel.positionOffset_Y = 5;
     PlayerNPCDialogueUI.characterLabel.sizeOffset_X     = -10;
     PlayerNPCDialogueUI.characterLabel.sizeOffset_Y     = 30;
     PlayerNPCDialogueUI.characterLabel.sizeScale_X      = 1f;
     PlayerNPCDialogueUI.characterLabel.fontAlignment    = TextAnchor.UpperLeft;
     PlayerNPCDialogueUI.characterLabel.foregroundTint   = ESleekTint.NONE;
     PlayerNPCDialogueUI.characterLabel.isRich           = true;
     PlayerNPCDialogueUI.characterLabel.fontSize         = 14;
     PlayerNPCDialogueUI.dialogueBox.add(PlayerNPCDialogueUI.characterLabel);
     PlayerNPCDialogueUI.messageLabel = new SleekLabel();
     PlayerNPCDialogueUI.messageLabel.positionOffset_X = 5;
     PlayerNPCDialogueUI.messageLabel.positionOffset_Y = 30;
     PlayerNPCDialogueUI.messageLabel.sizeOffset_X     = -10;
     PlayerNPCDialogueUI.messageLabel.sizeOffset_Y     = -35;
     PlayerNPCDialogueUI.messageLabel.sizeScale_X      = 1f;
     PlayerNPCDialogueUI.messageLabel.sizeScale_Y      = 1f;
     PlayerNPCDialogueUI.messageLabel.fontAlignment    = TextAnchor.UpperLeft;
     PlayerNPCDialogueUI.messageLabel.foregroundTint   = ESleekTint.NONE;
     PlayerNPCDialogueUI.messageLabel.isRich           = true;
     PlayerNPCDialogueUI.dialogueBox.add(PlayerNPCDialogueUI.messageLabel);
     PlayerNPCDialogueUI.pageLabel = new SleekLabel();
     PlayerNPCDialogueUI.pageLabel.positionOffset_X = -30;
     PlayerNPCDialogueUI.pageLabel.positionOffset_Y = -30;
     PlayerNPCDialogueUI.pageLabel.positionScale_X  = 1f;
     PlayerNPCDialogueUI.pageLabel.positionScale_Y  = 1f;
     PlayerNPCDialogueUI.pageLabel.sizeOffset_X     = 30;
     PlayerNPCDialogueUI.pageLabel.sizeOffset_Y     = 30;
     PlayerNPCDialogueUI.pageLabel.fontAlignment    = TextAnchor.LowerRight;
     PlayerNPCDialogueUI.dialogueBox.add(PlayerNPCDialogueUI.pageLabel);
     PlayerNPCDialogueUI.responseBox = new SleekScrollBox();
     PlayerNPCDialogueUI.responseBox.positionOffset_X = -250;
     PlayerNPCDialogueUI.responseBox.positionOffset_Y = -100;
     PlayerNPCDialogueUI.responseBox.positionScale_X  = 0.5f;
     PlayerNPCDialogueUI.responseBox.positionScale_Y  = 0.85f;
     PlayerNPCDialogueUI.responseBox.sizeOffset_X     = 530;
     PlayerNPCDialogueUI.responseBox.sizeScale_Y      = 0.15f;
     PlayerNPCDialogueUI.container.add(PlayerNPCDialogueUI.responseBox);
     PlayerNPCDialogueUI.responseBox.isVisible = false;
 }
        // Token: 0x06003878 RID: 14456 RVA: 0x001988C4 File Offset: 0x00196CC4
        public PlayerDashboardUI()
        {
            Local  local  = Localization.read("/Player/PlayerDashboard.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerDashboard/PlayerDashboard.unity3d");

            PlayerDashboardUI.container = new Sleek();
            PlayerDashboardUI.container.positionScale_Y  = -1f;
            PlayerDashboardUI.container.positionOffset_X = 10;
            PlayerDashboardUI.container.positionOffset_Y = 10;
            PlayerDashboardUI.container.sizeOffset_X     = -20;
            PlayerDashboardUI.container.sizeOffset_Y     = -20;
            PlayerDashboardUI.container.sizeScale_X      = 1f;
            PlayerDashboardUI.container.sizeScale_Y      = 1f;
            PlayerUI.container.add(PlayerDashboardUI.container);
            PlayerDashboardUI.active          = false;
            PlayerDashboardUI.inventoryButton = new SleekButtonIcon((Texture2D)bundle.load("Inventory"));
            PlayerDashboardUI.inventoryButton.sizeOffset_X = -5;
            PlayerDashboardUI.inventoryButton.sizeOffset_Y = 50;
            PlayerDashboardUI.inventoryButton.sizeScale_X  = 0.25f;
            PlayerDashboardUI.inventoryButton.text         = local.format("Inventory", new object[]
            {
                ControlsSettings.inventory
            });
            PlayerDashboardUI.inventoryButton.tooltip = local.format("Inventory_Tooltip");
            SleekButton sleekButton = PlayerDashboardUI.inventoryButton;

            if (PlayerDashboardUI.< > f__mg$cache0 == null)
            {
                PlayerDashboardUI.< > f__mg$cache0 = new ClickedButton(PlayerDashboardUI.onClickedInventoryButton);
            }
            sleekButton.onClickedButton = PlayerDashboardUI.< > f__mg$cache0;
            PlayerDashboardUI.inventoryButton.fontSize = 14;
            PlayerDashboardUI.inventoryButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            PlayerDashboardUI.container.add(PlayerDashboardUI.inventoryButton);
            PlayerDashboardUI.craftingButton = new SleekButtonIcon((Texture2D)bundle.load("Crafting"));
            PlayerDashboardUI.craftingButton.positionOffset_X = 5;
            PlayerDashboardUI.craftingButton.positionScale_X  = 0.25f;
            PlayerDashboardUI.craftingButton.sizeOffset_X     = -10;
            PlayerDashboardUI.craftingButton.sizeOffset_Y     = 50;
            PlayerDashboardUI.craftingButton.sizeScale_X      = 0.25f;
            PlayerDashboardUI.craftingButton.text             = local.format("Crafting", new object[]
            {
                ControlsSettings.crafting
            });
            PlayerDashboardUI.craftingButton.tooltip = local.format("Crafting_Tooltip");
            SleekButton sleekButton2 = PlayerDashboardUI.craftingButton;

            if (PlayerDashboardUI.< > f__mg$cache1 == null)
            {
                PlayerDashboardUI.< > f__mg$cache1 = new ClickedButton(PlayerDashboardUI.onClickedCraftingButton);
            }
            sleekButton2.onClickedButton = PlayerDashboardUI.< > f__mg$cache1;
            PlayerDashboardUI.craftingButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            PlayerDashboardUI.craftingButton.fontSize = 14;
            PlayerDashboardUI.container.add(PlayerDashboardUI.craftingButton);
            PlayerDashboardUI.skillsButton = new SleekButtonIcon((Texture2D)bundle.load("Skills"));
            PlayerDashboardUI.skillsButton.positionOffset_X = 5;
            PlayerDashboardUI.skillsButton.positionScale_X  = 0.5f;
            PlayerDashboardUI.skillsButton.sizeOffset_X     = -10;
            PlayerDashboardUI.skillsButton.sizeOffset_Y     = 50;
            PlayerDashboardUI.skillsButton.sizeScale_X      = 0.25f;
            PlayerDashboardUI.skillsButton.text             = local.format("Skills", new object[]
            {
                ControlsSettings.skills
            });
            PlayerDashboardUI.skillsButton.tooltip = local.format("Skills_Tooltip");
            PlayerDashboardUI.skillsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton3 = PlayerDashboardUI.skillsButton;

            if (PlayerDashboardUI.< > f__mg$cache2 == null)
            {
                PlayerDashboardUI.< > f__mg$cache2 = new ClickedButton(PlayerDashboardUI.onClickedSkillsButton);
            }
            sleekButton3.onClickedButton            = PlayerDashboardUI.< > f__mg$cache2;
            PlayerDashboardUI.skillsButton.fontSize = 14;
            PlayerDashboardUI.container.add(PlayerDashboardUI.skillsButton);
            PlayerDashboardUI.informationButton = new SleekButtonIcon((Texture2D)bundle.load("Information"));
            PlayerDashboardUI.informationButton.positionOffset_X = 5;
            PlayerDashboardUI.informationButton.positionScale_X  = 0.75f;
            PlayerDashboardUI.informationButton.sizeOffset_X     = -5;
            PlayerDashboardUI.informationButton.sizeOffset_Y     = 50;
            PlayerDashboardUI.informationButton.sizeScale_X      = 0.25f;
            PlayerDashboardUI.informationButton.text             = local.format("Information", new object[]
            {
                ControlsSettings.map
            });
            PlayerDashboardUI.informationButton.tooltip = local.format("Information_Tooltip");
            PlayerDashboardUI.informationButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton4 = PlayerDashboardUI.informationButton;

            if (PlayerDashboardUI.< > f__mg$cache3 == null)
            {
                PlayerDashboardUI.< > f__mg$cache3 = new ClickedButton(PlayerDashboardUI.onClickedInformationButton);
            }
            sleekButton4.onClickedButton = PlayerDashboardUI.< > f__mg$cache3;
            PlayerDashboardUI.informationButton.fontSize = 14;
            PlayerDashboardUI.container.add(PlayerDashboardUI.informationButton);
            if (Level.info != null && Level.info.type == ELevelType.HORDE)
            {
                PlayerDashboardUI.inventoryButton.sizeScale_X       = 0.5f;
                PlayerDashboardUI.craftingButton.isVisible          = false;
                PlayerDashboardUI.skillsButton.isVisible            = false;
                PlayerDashboardUI.informationButton.positionScale_X = 0.5f;
                PlayerDashboardUI.informationButton.sizeScale_X     = 0.5f;
            }
            bundle.unload();
            new PlayerDashboardInventoryUI();
            new PlayerDashboardCraftingUI();
            new PlayerDashboardSkillsUI();
            new PlayerDashboardInformationUI();
        }
Example #23
0
        public MenuPlayLobbiesUI()
        {
            MenuPlayLobbiesUI.localization = Localization.read("/Menu/Play/MenuPlayLobbies.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Play/MenuPlayLobbies/MenuPlayLobbies.unity3d");

            MenuPlayLobbiesUI.container = new Sleek();
            MenuPlayLobbiesUI.container.positionOffset_X = 10;
            MenuPlayLobbiesUI.container.positionOffset_Y = 10;
            MenuPlayLobbiesUI.container.positionScale_Y  = 1f;
            MenuPlayLobbiesUI.container.sizeOffset_X     = -20;
            MenuPlayLobbiesUI.container.sizeOffset_Y     = -20;
            MenuPlayLobbiesUI.container.sizeScale_X      = 1f;
            MenuPlayLobbiesUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuPlayLobbiesUI.container);
            MenuPlayLobbiesUI.active = false;
            bundle.unload();
            MenuPlayLobbiesUI.membersLabel = new SleekLabel();
            MenuPlayLobbiesUI.membersLabel.positionOffset_X = -200;
            MenuPlayLobbiesUI.membersLabel.positionOffset_Y = 100;
            MenuPlayLobbiesUI.membersLabel.positionScale_X  = 0.5f;
            MenuPlayLobbiesUI.membersLabel.sizeOffset_X     = 400;
            MenuPlayLobbiesUI.membersLabel.sizeOffset_Y     = 50;
            MenuPlayLobbiesUI.membersLabel.text             = MenuPlayLobbiesUI.localization.format("Members");
            MenuPlayLobbiesUI.membersLabel.fontSize         = 14;
            MenuPlayLobbiesUI.container.add(MenuPlayLobbiesUI.membersLabel);
            MenuPlayLobbiesUI.membersBox = new SleekScrollBox();
            MenuPlayLobbiesUI.membersBox.positionOffset_X = -200;
            MenuPlayLobbiesUI.membersBox.positionOffset_Y = 150;
            MenuPlayLobbiesUI.membersBox.positionScale_X  = 0.5f;
            MenuPlayLobbiesUI.membersBox.sizeOffset_X     = 430;
            MenuPlayLobbiesUI.membersBox.sizeOffset_Y     = -300;
            MenuPlayLobbiesUI.membersBox.sizeScale_Y      = 1f;
            MenuPlayLobbiesUI.container.add(MenuPlayLobbiesUI.membersBox);
            MenuPlayLobbiesUI.inviteButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Invite"));
            MenuPlayLobbiesUI.inviteButton.positionOffset_X = -200;
            MenuPlayLobbiesUI.inviteButton.positionOffset_Y = -150;
            MenuPlayLobbiesUI.inviteButton.positionScale_X  = 0.5f;
            MenuPlayLobbiesUI.inviteButton.positionScale_Y  = 1f;
            MenuPlayLobbiesUI.inviteButton.sizeOffset_X     = 400;
            MenuPlayLobbiesUI.inviteButton.sizeOffset_Y     = 50;
            MenuPlayLobbiesUI.inviteButton.text             = MenuPlayLobbiesUI.localization.format("Invite_Button");
            MenuPlayLobbiesUI.inviteButton.tooltip          = MenuPlayLobbiesUI.localization.format("Invite_Button_Tooltip");
            SleekButton sleekButton = MenuPlayLobbiesUI.inviteButton;

            if (MenuPlayLobbiesUI.< > f__mg$cache0 == null)
            {
                MenuPlayLobbiesUI.< > f__mg$cache0 = new ClickedButton(MenuPlayLobbiesUI.onClickedInviteButton);
            }
            sleekButton.onClickedButton             = MenuPlayLobbiesUI.< > f__mg$cache0;
            MenuPlayLobbiesUI.inviteButton.fontSize = 14;
            MenuPlayLobbiesUI.inviteButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuPlayLobbiesUI.container.add(MenuPlayLobbiesUI.inviteButton);
            MenuPlayLobbiesUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuPlayLobbiesUI.backButton.positionOffset_Y = -50;
            MenuPlayLobbiesUI.backButton.positionScale_Y  = 1f;
            MenuPlayLobbiesUI.backButton.sizeOffset_X     = 200;
            MenuPlayLobbiesUI.backButton.sizeOffset_Y     = 50;
            MenuPlayLobbiesUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuPlayLobbiesUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton2 = MenuPlayLobbiesUI.backButton;

            if (MenuPlayLobbiesUI.< > f__mg$cache1 == null)
            {
                MenuPlayLobbiesUI.< > f__mg$cache1 = new ClickedButton(MenuPlayLobbiesUI.onClickedBackButton);
            }
            sleekButton2.onClickedButton          = MenuPlayLobbiesUI.< > f__mg$cache1;
            MenuPlayLobbiesUI.backButton.fontSize = 14;
            MenuPlayLobbiesUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuPlayLobbiesUI.container.add(MenuPlayLobbiesUI.backButton);
            if (MenuPlayLobbiesUI.< > f__mg$cache2 == null)
            {
                MenuPlayLobbiesUI.< > f__mg$cache2 = new LobbiesRefreshedHandler(MenuPlayLobbiesUI.handleLobbiesRefreshed);
            }
            Lobbies.lobbiesRefreshed = MenuPlayLobbiesUI.< > f__mg$cache2;
            if (MenuPlayLobbiesUI.< > f__mg$cache3 == null)
            {
                MenuPlayLobbiesUI.< > f__mg$cache3 = new LobbiesEnteredHandler(MenuPlayLobbiesUI.handleLobbiesEntered);
            }
            Lobbies.lobbiesEntered = MenuPlayLobbiesUI.< > f__mg$cache3;
        }
Example #24
0
		public static void chartify()
		{
			Bundle bundle = Bundles.getBundle(Level.info.path + "/Charts.unity3d", false);
			if (bundle == null)
			{
				return;
			}
			Texture2D texture2D = (Texture2D)bundle.load("Height_Strip");
			Texture2D texture2D2 = (Texture2D)bundle.load("Layer_Strip");
			bundle.unload();
			if (texture2D == null || texture2D2 == null)
			{
				return;
			}
			Texture2D texture2D3 = new Texture2D((int)Level.size, (int)Level.size);
			texture2D3.name = "Chartify";
			texture2D3.hideFlags = 61;
			texture2D3.filterMode = 2;
			float num = Mathf.Clamp01(WaterSystem.worldSeaLevel / Level.TERRAIN);
			float num2 = 1f;
			for (byte b = 0; b < Regions.WORLD_SIZE; b += 1)
			{
				for (byte b2 = 0; b2 < Regions.WORLD_SIZE; b2 += 1)
				{
					if (!LevelObjects.regions[(int)b, (int)b2])
					{
						List<LevelObject> list = LevelObjects.objects[(int)b, (int)b2];
						for (int i = 0; i < list.Count; i++)
						{
							list[i].enableCollision();
							list[i].enableVisual();
						}
					}
					if (!LevelGround.regions[(int)b, (int)b2])
					{
						List<ResourceSpawnpoint> list2 = LevelGround.trees[(int)b, (int)b2];
						for (int j = 0; j < list2.Count; j++)
						{
							list2[j].enable();
						}
					}
				}
			}
			GameObject gameObject = new GameObject();
			gameObject.layer = LayerMasks.GROUND;
			for (int k = 0; k < texture2D3.width; k++)
			{
				for (int l = 0; l < texture2D3.height; l++)
				{
					Vector3 vector;
					vector..ctor((float)(-(float)Level.size) / 2f + (float)Level.border + (float)k / (float)texture2D3.width * ((float)Level.size - (float)Level.border * 2f), Level.HEIGHT, (float)(-(float)Level.size) / 2f + (float)Level.border + (float)l / (float)texture2D3.height * ((float)Level.size - (float)Level.border * 2f));
					EObjectChart eobjectChart;
					RaycastHit raycastHit;
					Level.findChartHit(vector, out eobjectChart, out raycastHit);
					Transform transform = raycastHit.transform;
					Vector3 point = raycastHit.point;
					if (transform == null)
					{
						transform = gameObject.transform;
						point = vector;
						point.y = LevelGround.getHeight(vector);
					}
					int num3 = transform.gameObject.layer;
					if (eobjectChart == EObjectChart.GROUND)
					{
						num3 = LayerMasks.GROUND;
					}
					else if (eobjectChart == EObjectChart.HIGHWAY)
					{
						num3 = 0;
					}
					else if (eobjectChart == EObjectChart.ROAD)
					{
						num3 = 1;
					}
					else if (eobjectChart == EObjectChart.STREET)
					{
						num3 = 2;
					}
					else if (eobjectChart == EObjectChart.PATH)
					{
						num3 = 3;
					}
					else if (eobjectChart == EObjectChart.LARGE)
					{
						num3 = LayerMasks.LARGE;
					}
					else if (eobjectChart == EObjectChart.MEDIUM)
					{
						num3 = LayerMasks.MEDIUM;
					}
					else if (eobjectChart == EObjectChart.CLIFF)
					{
						num3 = 4;
					}
					if (num3 == LayerMasks.ENVIRONMENT)
					{
						RoadMaterial roadMaterial = LevelRoads.getRoadMaterial(transform);
						if (roadMaterial != null)
						{
							if (!roadMaterial.isConcrete)
							{
								num3 = 3;
							}
							else if (roadMaterial.width > 8f)
							{
								num3 = 0;
							}
							else
							{
								num3 = 1;
							}
						}
					}
					Color pixel;
					if (eobjectChart == EObjectChart.WATER)
					{
						pixel = texture2D.GetPixel(0, 0);
					}
					else if (num3 == LayerMasks.GROUND)
					{
						if (WaterUtility.isPointUnderwater(point))
						{
							pixel = texture2D.GetPixel(0, 0);
						}
						else
						{
							float num4 = point.y / Level.TERRAIN;
							num4 = (num4 - num) / (num2 - num);
							num4 = Mathf.Clamp01(num4);
							pixel = texture2D.GetPixel((int)(num4 * (float)(texture2D.width - 1)) + 1, 0);
						}
					}
					else
					{
						pixel = texture2D2.GetPixel(num3, 0);
					}
					texture2D3.SetPixel(k, l, pixel);
				}
			}
			texture2D3.Apply();
			for (byte b3 = 0; b3 < Regions.WORLD_SIZE; b3 += 1)
			{
				for (byte b4 = 0; b4 < Regions.WORLD_SIZE; b4 += 1)
				{
					if (!LevelObjects.regions[(int)b3, (int)b4])
					{
						List<LevelObject> list3 = LevelObjects.objects[(int)b3, (int)b4];
						for (int m = 0; m < list3.Count; m++)
						{
							list3[m].disableCollision();
							list3[m].disableVisual();
						}
					}
					if (!LevelGround.regions[(int)b3, (int)b4])
					{
						List<ResourceSpawnpoint> list4 = LevelGround.trees[(int)b3, (int)b4];
						for (int n = 0; n < list4.Count; n++)
						{
							list4[n].disable();
						}
					}
				}
			}
			byte[] bytes = texture2D3.EncodeToPNG();
			ReadWrite.writeBytes(Level.info.path + "/Chart.png", false, false, bytes);
			Object.DestroyImmediate(texture2D3);
		}
Example #25
0
        public MenuWorkshopUI()
        {
            MenuWorkshopUI.localization = Localization.read("/Menu/Workshop/MenuWorkshop.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Workshop/MenuWorkshop/MenuWorkshop.unity3d");

            MenuWorkshopUI.container = new Sleek();
            MenuWorkshopUI.container.positionOffset_X = 10;
            MenuWorkshopUI.container.positionOffset_Y = 10;
            MenuWorkshopUI.container.positionScale_Y  = -1f;
            MenuWorkshopUI.container.sizeOffset_X     = -20;
            MenuWorkshopUI.container.sizeOffset_Y     = -20;
            MenuWorkshopUI.container.sizeScale_X      = 1f;
            MenuWorkshopUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuWorkshopUI.container);
            MenuWorkshopUI.active       = false;
            MenuWorkshopUI.browseButton = new SleekButtonIcon((Texture2D)bundle.load("Browse"));
            MenuWorkshopUI.browseButton.positionOffset_X = -100;
            MenuWorkshopUI.browseButton.positionOffset_Y = -235;
            MenuWorkshopUI.browseButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.browseButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.browseButton.sizeOffset_X     = 200;
            MenuWorkshopUI.browseButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.browseButton.text             = MenuWorkshopUI.localization.format("BrowseButtonText");
            MenuWorkshopUI.browseButton.tooltip          = MenuWorkshopUI.localization.format("BrowseButtonTooltip");
            SleekButton sleekButton = MenuWorkshopUI.browseButton;

            if (MenuWorkshopUI.< > f__mg$cache0 == null)
            {
                MenuWorkshopUI.< > f__mg$cache0 = new ClickedButton(MenuWorkshopUI.onClickedBrowseButton);
            }
            sleekButton.onClickedButton          = MenuWorkshopUI.< > f__mg$cache0;
            MenuWorkshopUI.browseButton.fontSize = 14;
            MenuWorkshopUI.browseButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.browseButton);
            MenuWorkshopUI.submitButton = new SleekButtonIcon((Texture2D)bundle.load("Submit"));
            MenuWorkshopUI.submitButton.positionOffset_X = -100;
            MenuWorkshopUI.submitButton.positionOffset_Y = -175;
            MenuWorkshopUI.submitButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.submitButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.submitButton.sizeOffset_X     = 200;
            MenuWorkshopUI.submitButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.submitButton.text             = MenuWorkshopUI.localization.format("SubmitButtonText");
            MenuWorkshopUI.submitButton.tooltip          = MenuWorkshopUI.localization.format("SubmitButtonTooltip");
            SleekButton sleekButton2 = MenuWorkshopUI.submitButton;

            if (MenuWorkshopUI.< > f__mg$cache1 == null)
            {
                MenuWorkshopUI.< > f__mg$cache1 = new ClickedButton(MenuWorkshopUI.onClickedSubmitButton);
            }
            sleekButton2.onClickedButton         = MenuWorkshopUI.< > f__mg$cache1;
            MenuWorkshopUI.submitButton.fontSize = 14;
            MenuWorkshopUI.submitButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.submitButton);
            MenuWorkshopUI.editorButton = new SleekButtonIcon((Texture2D)bundle.load("Editor"));
            MenuWorkshopUI.editorButton.positionOffset_X = -100;
            MenuWorkshopUI.editorButton.positionOffset_Y = -115;
            MenuWorkshopUI.editorButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.editorButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.editorButton.sizeOffset_X     = 200;
            MenuWorkshopUI.editorButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.editorButton.text             = MenuWorkshopUI.localization.format("EditorButtonText");
            MenuWorkshopUI.editorButton.tooltip          = MenuWorkshopUI.localization.format("EditorButtonTooltip");
            SleekButton sleekButton3 = MenuWorkshopUI.editorButton;

            if (MenuWorkshopUI.< > f__mg$cache2 == null)
            {
                MenuWorkshopUI.< > f__mg$cache2 = new ClickedButton(MenuWorkshopUI.onClickedEditorButton);
            }
            sleekButton3.onClickedButton         = MenuWorkshopUI.< > f__mg$cache2;
            MenuWorkshopUI.editorButton.fontSize = 14;
            MenuWorkshopUI.editorButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.editorButton);
            MenuWorkshopUI.errorButton = new SleekButtonIcon((Texture2D)bundle.load("Error"));
            MenuWorkshopUI.errorButton.positionOffset_X = -100;
            MenuWorkshopUI.errorButton.positionOffset_Y = -55;
            MenuWorkshopUI.errorButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.errorButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.errorButton.sizeOffset_X     = 200;
            MenuWorkshopUI.errorButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.errorButton.text             = MenuWorkshopUI.localization.format("ErrorButtonText");
            MenuWorkshopUI.errorButton.tooltip          = MenuWorkshopUI.localization.format("ErrorButtonTooltip");
            SleekButton sleekButton4 = MenuWorkshopUI.errorButton;

            if (MenuWorkshopUI.< > f__mg$cache3 == null)
            {
                MenuWorkshopUI.< > f__mg$cache3 = new ClickedButton(MenuWorkshopUI.onClickedErrorButton);
            }
            sleekButton4.onClickedButton        = MenuWorkshopUI.< > f__mg$cache3;
            MenuWorkshopUI.errorButton.fontSize = 14;
            MenuWorkshopUI.errorButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.errorButton);
            MenuWorkshopUI.localizationButton = new SleekButtonIcon((Texture2D)bundle.load("Localization"));
            MenuWorkshopUI.localizationButton.positionOffset_X = -100;
            MenuWorkshopUI.localizationButton.positionOffset_Y = 5;
            MenuWorkshopUI.localizationButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.localizationButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.localizationButton.sizeOffset_X     = 200;
            MenuWorkshopUI.localizationButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.localizationButton.text             = MenuWorkshopUI.localization.format("LocalizationButtonText");
            MenuWorkshopUI.localizationButton.tooltip          = MenuWorkshopUI.localization.format("LocalizationButtonTooltip");
            SleekButton sleekButton5 = MenuWorkshopUI.localizationButton;

            if (MenuWorkshopUI.< > f__mg$cache4 == null)
            {
                MenuWorkshopUI.< > f__mg$cache4 = new ClickedButton(MenuWorkshopUI.onClickedLocalizationButton);
            }
            sleekButton5.onClickedButton = MenuWorkshopUI.< > f__mg$cache4;
            MenuWorkshopUI.localizationButton.fontSize = 14;
            MenuWorkshopUI.localizationButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.localizationButton);
            MenuWorkshopUI.spawnsButton = new SleekButtonIcon((Texture2D)bundle.load("Spawns"));
            MenuWorkshopUI.spawnsButton.positionOffset_X = -100;
            MenuWorkshopUI.spawnsButton.positionOffset_Y = 65;
            MenuWorkshopUI.spawnsButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.spawnsButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.spawnsButton.sizeOffset_X     = 200;
            MenuWorkshopUI.spawnsButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.spawnsButton.text             = MenuWorkshopUI.localization.format("SpawnsButtonText");
            MenuWorkshopUI.spawnsButton.tooltip          = MenuWorkshopUI.localization.format("SpawnsButtonTooltip");
            SleekButton sleekButton6 = MenuWorkshopUI.spawnsButton;

            if (MenuWorkshopUI.< > f__mg$cache5 == null)
            {
                MenuWorkshopUI.< > f__mg$cache5 = new ClickedButton(MenuWorkshopUI.onClickedSpawnsButton);
            }
            sleekButton6.onClickedButton         = MenuWorkshopUI.< > f__mg$cache5;
            MenuWorkshopUI.spawnsButton.fontSize = 14;
            MenuWorkshopUI.spawnsButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.spawnsButton);
            MenuWorkshopUI.modulesButton = new SleekButtonIcon((Texture2D)bundle.load("Modules"));
            MenuWorkshopUI.modulesButton.positionOffset_X = -100;
            MenuWorkshopUI.modulesButton.positionOffset_Y = 125;
            MenuWorkshopUI.modulesButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.modulesButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.modulesButton.sizeOffset_X     = 200;
            MenuWorkshopUI.modulesButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.modulesButton.text             = MenuWorkshopUI.localization.format("ModulesButtonText");
            MenuWorkshopUI.modulesButton.tooltip          = MenuWorkshopUI.localization.format("ModulesButtonTooltip");
            SleekButton sleekButton7 = MenuWorkshopUI.modulesButton;

            if (MenuWorkshopUI.< > f__mg$cache6 == null)
            {
                MenuWorkshopUI.< > f__mg$cache6 = new ClickedButton(MenuWorkshopUI.onClickedModulesButton);
            }
            sleekButton7.onClickedButton          = MenuWorkshopUI.< > f__mg$cache6;
            MenuWorkshopUI.modulesButton.fontSize = 14;
            MenuWorkshopUI.modulesButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.modulesButton);
            MenuWorkshopUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuWorkshopUI.backButton.positionOffset_X = -100;
            MenuWorkshopUI.backButton.positionOffset_Y = 185;
            MenuWorkshopUI.backButton.positionScale_X  = 0.5f;
            MenuWorkshopUI.backButton.positionScale_Y  = 0.5f;
            MenuWorkshopUI.backButton.sizeOffset_X     = 200;
            MenuWorkshopUI.backButton.sizeOffset_Y     = 50;
            MenuWorkshopUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuWorkshopUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton8 = MenuWorkshopUI.backButton;

            if (MenuWorkshopUI.< > f__mg$cache7 == null)
            {
                MenuWorkshopUI.< > f__mg$cache7 = new ClickedButton(MenuWorkshopUI.onClickedBackButton);
            }
            sleekButton8.onClickedButton       = MenuWorkshopUI.< > f__mg$cache7;
            MenuWorkshopUI.backButton.fontSize = 14;
            MenuWorkshopUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuWorkshopUI.container.add(MenuWorkshopUI.backButton);
            bundle.unload();
            new MenuWorkshopSubmitUI();
            new MenuWorkshopEditorUI();
            new MenuWorkshopErrorUI();
            new MenuWorkshopLocalizationUI();
            new MenuWorkshopSpawnsUI();
            new MenuWorkshopModulesUI();
        }
Example #26
0
        public MenuSurvivorsAppearanceUI()
        {
            MenuSurvivorsAppearanceUI.localization = Localization.read("/Menu/Survivors/MenuSurvivorsAppearance.dat");
            MenuSurvivorsAppearanceUI.container    = new Sleek();
            MenuSurvivorsAppearanceUI.container.positionOffset_X = 10;
            MenuSurvivorsAppearanceUI.container.positionOffset_Y = 10;
            MenuSurvivorsAppearanceUI.container.positionScale_Y  = 1f;
            MenuSurvivorsAppearanceUI.container.sizeOffset_X     = -20;
            MenuSurvivorsAppearanceUI.container.sizeOffset_Y     = -20;
            MenuSurvivorsAppearanceUI.container.sizeScale_X      = 1f;
            MenuSurvivorsAppearanceUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuSurvivorsAppearanceUI.container);
            MenuSurvivorsAppearanceUI.active           = false;
            MenuSurvivorsAppearanceUI.customizationBox = new SleekScrollBox();
            MenuSurvivorsAppearanceUI.customizationBox.positionOffset_X = -140;
            MenuSurvivorsAppearanceUI.customizationBox.positionOffset_Y = 100;
            MenuSurvivorsAppearanceUI.customizationBox.positionScale_X  = 0.75f;
            MenuSurvivorsAppearanceUI.customizationBox.sizeOffset_X     = 270;
            MenuSurvivorsAppearanceUI.customizationBox.sizeOffset_Y     = -270;
            MenuSurvivorsAppearanceUI.customizationBox.sizeScale_Y      = 1f;
            MenuSurvivorsAppearanceUI.container.add(MenuSurvivorsAppearanceUI.customizationBox);
            MenuSurvivorsAppearanceUI.faceBox = new SleekBox();
            MenuSurvivorsAppearanceUI.faceBox.sizeOffset_X = 240;
            MenuSurvivorsAppearanceUI.faceBox.sizeOffset_Y = 30;
            MenuSurvivorsAppearanceUI.faceBox.text         = MenuSurvivorsAppearanceUI.localization.format("Face_Box");
            MenuSurvivorsAppearanceUI.faceBox.tooltip      = MenuSurvivorsAppearanceUI.localization.format("Face_Box_Tooltip");
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.faceBox);
            MenuSurvivorsAppearanceUI.faceButtons = new SleekButton[(int)(Customization.FACES_FREE + Customization.FACES_PRO)];
            for (int i = 0; i < MenuSurvivorsAppearanceUI.faceButtons.Length; i++)
            {
                SleekButton sleekButton = new SleekButton();
                sleekButton.positionOffset_X = i % 5 * 50;
                sleekButton.positionOffset_Y = 40 + Mathf.FloorToInt((float)i / 5f) * 50;
                sleekButton.sizeOffset_X     = 40;
                sleekButton.sizeOffset_Y     = 40;
                MenuSurvivorsAppearanceUI.faceBox.add(sleekButton);
                SleekImageTexture sleekImageTexture = new SleekImageTexture();
                sleekImageTexture.positionOffset_X = 10;
                sleekImageTexture.positionOffset_Y = 10;
                sleekImageTexture.sizeOffset_X     = 20;
                sleekImageTexture.sizeOffset_Y     = 20;
                sleekImageTexture.texture          = (Texture2D)Resources.Load("Materials/Pixel");
                sleekButton.add(sleekImageTexture);
                sleekImageTexture.add(new SleekImageTexture
                {
                    positionOffset_X = 2,
                    positionOffset_Y = 2,
                    sizeOffset_X     = 16,
                    sizeOffset_Y     = 16,
                    texture          = (Texture2D)Resources.Load("Faces/" + i + "/Texture")
                });
                if (i >= (int)Customization.FACES_FREE)
                {
                    if (Provider.isPro)
                    {
                        SleekButton sleekButton2 = sleekButton;
                        if (MenuSurvivorsAppearanceUI.< > f__mg$cache0 == null)
                        {
                            MenuSurvivorsAppearanceUI.< > f__mg$cache0 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedFaceButton);
                        }
                        sleekButton2.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache0;
                    }
                    else
                    {
                        sleekButton.backgroundColor = Palette.PRO;
                        Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Pro/Pro.unity3d");
                        sleekButton.add(new SleekImageTexture
                        {
                            positionOffset_X = -10,
                            positionOffset_Y = -10,
                            positionScale_X  = 0.5f,
                            positionScale_Y  = 0.5f,
                            sizeOffset_X     = 20,
                            sizeOffset_Y     = 20,
                            texture          = (Texture2D)bundle.load("Lock_Small")
                        });
                        bundle.unload();
                    }
                }
                else
                {
                    SleekButton sleekButton3 = sleekButton;
                    if (MenuSurvivorsAppearanceUI.< > f__mg$cache1 == null)
                    {
                        MenuSurvivorsAppearanceUI.< > f__mg$cache1 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedFaceButton);
                    }
                    sleekButton3.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache1;
                }
                MenuSurvivorsAppearanceUI.faceButtons[i] = sleekButton;
            }
            MenuSurvivorsAppearanceUI.hairBox = new SleekBox();
            MenuSurvivorsAppearanceUI.hairBox.positionOffset_Y = 80 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50;
            MenuSurvivorsAppearanceUI.hairBox.sizeOffset_X     = 240;
            MenuSurvivorsAppearanceUI.hairBox.sizeOffset_Y     = 30;
            MenuSurvivorsAppearanceUI.hairBox.text             = MenuSurvivorsAppearanceUI.localization.format("Hair_Box");
            MenuSurvivorsAppearanceUI.hairBox.tooltip          = MenuSurvivorsAppearanceUI.localization.format("Hair_Box_Tooltip");
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.hairBox);
            MenuSurvivorsAppearanceUI.hairButtons = new SleekButton[(int)(Customization.HAIRS_FREE + Customization.HAIRS_PRO)];
            for (int j = 0; j < MenuSurvivorsAppearanceUI.hairButtons.Length; j++)
            {
                SleekButton sleekButton4 = new SleekButton();
                sleekButton4.positionOffset_X = j % 5 * 50;
                sleekButton4.positionOffset_Y = 40 + Mathf.FloorToInt((float)j / 5f) * 50;
                sleekButton4.sizeOffset_X     = 40;
                sleekButton4.sizeOffset_Y     = 40;
                MenuSurvivorsAppearanceUI.hairBox.add(sleekButton4);
                sleekButton4.add(new SleekImageTexture
                {
                    positionOffset_X = 10,
                    positionOffset_Y = 10,
                    sizeOffset_X     = 20,
                    sizeOffset_Y     = 20,
                    texture          = (Texture2D)Resources.Load("Hairs/" + j + "/Texture")
                });
                if (j >= (int)Customization.HAIRS_FREE)
                {
                    if (Provider.isPro)
                    {
                        SleekButton sleekButton5 = sleekButton4;
                        if (MenuSurvivorsAppearanceUI.< > f__mg$cache2 == null)
                        {
                            MenuSurvivorsAppearanceUI.< > f__mg$cache2 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedHairButton);
                        }
                        sleekButton5.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache2;
                    }
                    else
                    {
                        sleekButton4.backgroundColor = Palette.PRO;
                        Bundle bundle2 = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Pro/Pro.unity3d");
                        sleekButton4.add(new SleekImageTexture
                        {
                            positionOffset_X = -10,
                            positionOffset_Y = -10,
                            positionScale_X  = 0.5f,
                            positionScale_Y  = 0.5f,
                            sizeOffset_X     = 20,
                            sizeOffset_Y     = 20,
                            texture          = (Texture2D)bundle2.load("Lock_Small")
                        });
                        bundle2.unload();
                    }
                }
                else
                {
                    SleekButton sleekButton6 = sleekButton4;
                    if (MenuSurvivorsAppearanceUI.< > f__mg$cache3 == null)
                    {
                        MenuSurvivorsAppearanceUI.< > f__mg$cache3 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedHairButton);
                    }
                    sleekButton6.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache3;
                }
                MenuSurvivorsAppearanceUI.hairButtons[j] = sleekButton4;
            }
            MenuSurvivorsAppearanceUI.beardBox = new SleekBox();
            MenuSurvivorsAppearanceUI.beardBox.positionOffset_Y = 160 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.hairButtons.Length / 5f) * 50;
            MenuSurvivorsAppearanceUI.beardBox.sizeOffset_X     = 240;
            MenuSurvivorsAppearanceUI.beardBox.sizeOffset_Y     = 30;
            MenuSurvivorsAppearanceUI.beardBox.text             = MenuSurvivorsAppearanceUI.localization.format("Beard_Box");
            MenuSurvivorsAppearanceUI.beardBox.tooltip          = MenuSurvivorsAppearanceUI.localization.format("Beard_Box_Tooltip");
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.beardBox);
            MenuSurvivorsAppearanceUI.beardButtons = new SleekButton[(int)(Customization.BEARDS_FREE + Customization.BEARDS_PRO)];
            for (int k = 0; k < MenuSurvivorsAppearanceUI.beardButtons.Length; k++)
            {
                SleekButton sleekButton7 = new SleekButton();
                sleekButton7.positionOffset_X = k % 5 * 50;
                sleekButton7.positionOffset_Y = 40 + Mathf.FloorToInt((float)k / 5f) * 50;
                sleekButton7.sizeOffset_X     = 40;
                sleekButton7.sizeOffset_Y     = 40;
                MenuSurvivorsAppearanceUI.beardBox.add(sleekButton7);
                sleekButton7.add(new SleekImageTexture
                {
                    positionOffset_X = 10,
                    positionOffset_Y = 10,
                    sizeOffset_X     = 20,
                    sizeOffset_Y     = 20,
                    texture          = (Texture2D)Resources.Load("Beards/" + k + "/Texture")
                });
                if (k >= (int)Customization.BEARDS_FREE)
                {
                    if (Provider.isPro)
                    {
                        SleekButton sleekButton8 = sleekButton7;
                        if (MenuSurvivorsAppearanceUI.< > f__mg$cache4 == null)
                        {
                            MenuSurvivorsAppearanceUI.< > f__mg$cache4 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedBeardButton);
                        }
                        sleekButton8.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache4;
                    }
                    else
                    {
                        sleekButton7.backgroundColor = Palette.PRO;
                        Bundle bundle3 = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Pro/Pro.unity3d");
                        sleekButton7.add(new SleekImageTexture
                        {
                            positionOffset_X = -10,
                            positionOffset_Y = -10,
                            positionScale_X  = 0.5f,
                            positionScale_Y  = 0.5f,
                            sizeOffset_X     = 20,
                            sizeOffset_Y     = 20,
                            texture          = (Texture2D)bundle3.load("Lock_Small")
                        });
                        bundle3.unload();
                    }
                }
                else
                {
                    SleekButton sleekButton9 = sleekButton7;
                    if (MenuSurvivorsAppearanceUI.< > f__mg$cache5 == null)
                    {
                        MenuSurvivorsAppearanceUI.< > f__mg$cache5 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedBeardButton);
                    }
                    sleekButton9.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache5;
                }
                MenuSurvivorsAppearanceUI.beardButtons[k] = sleekButton7;
            }
            MenuSurvivorsAppearanceUI.skinBox = new SleekBox();
            MenuSurvivorsAppearanceUI.skinBox.positionOffset_Y = 240 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.hairButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.beardButtons.Length / 5f) * 50;
            MenuSurvivorsAppearanceUI.skinBox.sizeOffset_X     = 240;
            MenuSurvivorsAppearanceUI.skinBox.sizeOffset_Y     = 30;
            MenuSurvivorsAppearanceUI.skinBox.text             = MenuSurvivorsAppearanceUI.localization.format("Skin_Box");
            MenuSurvivorsAppearanceUI.skinBox.tooltip          = MenuSurvivorsAppearanceUI.localization.format("Skin_Box_Tooltip");
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.skinBox);
            MenuSurvivorsAppearanceUI.skinButtons = new SleekButton[Customization.SKINS.Length];
            for (int l = 0; l < MenuSurvivorsAppearanceUI.skinButtons.Length; l++)
            {
                SleekButton sleekButton10 = new SleekButton();
                sleekButton10.positionOffset_X = l % 5 * 50;
                sleekButton10.positionOffset_Y = 40 + Mathf.FloorToInt((float)l / 5f) * 50;
                sleekButton10.sizeOffset_X     = 40;
                sleekButton10.sizeOffset_Y     = 40;
                SleekButton sleekButton11 = sleekButton10;
                if (MenuSurvivorsAppearanceUI.< > f__mg$cache6 == null)
                {
                    MenuSurvivorsAppearanceUI.< > f__mg$cache6 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedSkinButton);
                }
                sleekButton11.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache6;
                MenuSurvivorsAppearanceUI.skinBox.add(sleekButton10);
                sleekButton10.add(new SleekImageTexture
                {
                    positionOffset_X = 10,
                    positionOffset_Y = 10,
                    sizeOffset_X     = 20,
                    sizeOffset_Y     = 20,
                    texture          = (Texture2D)Resources.Load("Materials/Pixel"),
                    backgroundColor  = Customization.SKINS[l]
                });
                MenuSurvivorsAppearanceUI.skinButtons[l] = sleekButton10;
            }
            MenuSurvivorsAppearanceUI.skinColorPicker = new SleekColorPicker();
            MenuSurvivorsAppearanceUI.skinColorPicker.positionOffset_Y = 280 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.hairButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.beardButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.skinButtons.Length / 5f) * 50;
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.skinColorPicker);
            if (Provider.isPro)
            {
                SleekColorPicker sleekColorPicker = MenuSurvivorsAppearanceUI.skinColorPicker;
                if (MenuSurvivorsAppearanceUI.< > f__mg$cache7 == null)
                {
                    MenuSurvivorsAppearanceUI.< > f__mg$cache7 = new ColorPicked(MenuSurvivorsAppearanceUI.onSkinColorPicked);
                }
                sleekColorPicker.onColorPicked = MenuSurvivorsAppearanceUI.< > f__mg$cache7;
            }
            else
            {
                Bundle            bundle4            = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Pro/Pro.unity3d");
                SleekImageTexture sleekImageTexture2 = new SleekImageTexture();
                sleekImageTexture2.positionOffset_X = -40;
                sleekImageTexture2.positionOffset_Y = -40;
                sleekImageTexture2.positionScale_X  = 0.5f;
                sleekImageTexture2.positionScale_Y  = 0.5f;
                sleekImageTexture2.sizeOffset_X     = 80;
                sleekImageTexture2.sizeOffset_Y     = 80;
                sleekImageTexture2.texture          = (Texture2D)bundle4.load("Lock_Large");
                MenuSurvivorsAppearanceUI.skinColorPicker.add(sleekImageTexture2);
                bundle4.unload();
            }
            MenuSurvivorsAppearanceUI.colorBox = new SleekBox();
            MenuSurvivorsAppearanceUI.colorBox.positionOffset_Y = 440 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.hairButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.beardButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.skinButtons.Length / 5f) * 50;
            MenuSurvivorsAppearanceUI.colorBox.sizeOffset_X     = 240;
            MenuSurvivorsAppearanceUI.colorBox.sizeOffset_Y     = 30;
            MenuSurvivorsAppearanceUI.colorBox.text             = MenuSurvivorsAppearanceUI.localization.format("Color_Box");
            MenuSurvivorsAppearanceUI.colorBox.tooltip          = MenuSurvivorsAppearanceUI.localization.format("Color_Box_Tooltip");
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.colorBox);
            MenuSurvivorsAppearanceUI.colorButtons = new SleekButton[Customization.COLORS.Length];
            for (int m = 0; m < MenuSurvivorsAppearanceUI.colorButtons.Length; m++)
            {
                SleekButton sleekButton12 = new SleekButton();
                sleekButton12.positionOffset_X = m % 5 * 50;
                sleekButton12.positionOffset_Y = 40 + Mathf.FloorToInt((float)m / 5f) * 50;
                sleekButton12.sizeOffset_X     = 40;
                sleekButton12.sizeOffset_Y     = 40;
                SleekButton sleekButton13 = sleekButton12;
                if (MenuSurvivorsAppearanceUI.< > f__mg$cache8 == null)
                {
                    MenuSurvivorsAppearanceUI.< > f__mg$cache8 = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedColorButton);
                }
                sleekButton13.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cache8;
                MenuSurvivorsAppearanceUI.colorBox.add(sleekButton12);
                sleekButton12.add(new SleekImageTexture
                {
                    positionOffset_X = 10,
                    positionOffset_Y = 10,
                    sizeOffset_X     = 20,
                    sizeOffset_Y     = 20,
                    texture          = (Texture2D)Resources.Load("Materials/Pixel"),
                    backgroundColor  = Customization.COLORS[m]
                });
                MenuSurvivorsAppearanceUI.colorButtons[m] = sleekButton12;
            }
            MenuSurvivorsAppearanceUI.colorColorPicker = new SleekColorPicker();
            MenuSurvivorsAppearanceUI.colorColorPicker.positionOffset_Y = 480 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.hairButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.beardButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.skinButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.colorButtons.Length / 5f) * 50;
            MenuSurvivorsAppearanceUI.customizationBox.add(MenuSurvivorsAppearanceUI.colorColorPicker);
            if (Provider.isPro)
            {
                SleekColorPicker sleekColorPicker2 = MenuSurvivorsAppearanceUI.colorColorPicker;
                if (MenuSurvivorsAppearanceUI.< > f__mg$cache9 == null)
                {
                    MenuSurvivorsAppearanceUI.< > f__mg$cache9 = new ColorPicked(MenuSurvivorsAppearanceUI.onColorColorPicked);
                }
                sleekColorPicker2.onColorPicked = MenuSurvivorsAppearanceUI.< > f__mg$cache9;
            }
            else
            {
                Bundle            bundle5            = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Pro/Pro.unity3d");
                SleekImageTexture sleekImageTexture3 = new SleekImageTexture();
                sleekImageTexture3.positionOffset_X = -40;
                sleekImageTexture3.positionOffset_Y = -40;
                sleekImageTexture3.positionScale_X  = 0.5f;
                sleekImageTexture3.positionScale_Y  = 0.5f;
                sleekImageTexture3.sizeOffset_X     = 80;
                sleekImageTexture3.sizeOffset_Y     = 80;
                sleekImageTexture3.texture          = (Texture2D)bundle5.load("Lock_Large");
                MenuSurvivorsAppearanceUI.colorColorPicker.add(sleekImageTexture3);
                bundle5.unload();
            }
            MenuSurvivorsAppearanceUI.customizationBox.area = new Rect(0f, 0f, 5f, (float)(600 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.faceButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.hairButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.beardButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.skinButtons.Length / 5f) * 50 + Mathf.CeilToInt((float)MenuSurvivorsAppearanceUI.colorButtons.Length / 5f) * 50));
            Delegate onCharacterUpdated = Characters.onCharacterUpdated;

            if (MenuSurvivorsAppearanceUI.< > f__mg$cacheA == null)
            {
                MenuSurvivorsAppearanceUI.< > f__mg$cacheA = new CharacterUpdated(MenuSurvivorsAppearanceUI.onCharacterUpdated);
            }
            Characters.onCharacterUpdated       = (CharacterUpdated)Delegate.Combine(onCharacterUpdated, MenuSurvivorsAppearanceUI.< > f__mg$cacheA);
            MenuSurvivorsAppearanceUI.handState = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(MenuSurvivorsAppearanceUI.localization.format("Right")),
                new GUIContent(MenuSurvivorsAppearanceUI.localization.format("Left"))
            });
            MenuSurvivorsAppearanceUI.handState.positionOffset_X = -140;
            MenuSurvivorsAppearanceUI.handState.positionOffset_Y = -160;
            MenuSurvivorsAppearanceUI.handState.positionScale_X  = 0.75f;
            MenuSurvivorsAppearanceUI.handState.positionScale_Y  = 1f;
            MenuSurvivorsAppearanceUI.handState.sizeOffset_X     = 240;
            MenuSurvivorsAppearanceUI.handState.sizeOffset_Y     = 30;
            SleekButtonState sleekButtonState = MenuSurvivorsAppearanceUI.handState;

            if (MenuSurvivorsAppearanceUI.< > f__mg$cacheB == null)
            {
                MenuSurvivorsAppearanceUI.< > f__mg$cacheB = new SwappedState(MenuSurvivorsAppearanceUI.onSwappedHandState);
            }
            sleekButtonState.onSwappedState = MenuSurvivorsAppearanceUI.< > f__mg$cacheB;
            MenuSurvivorsAppearanceUI.container.add(MenuSurvivorsAppearanceUI.handState);
            MenuSurvivorsAppearanceUI.characterSlider = new SleekSlider();
            MenuSurvivorsAppearanceUI.characterSlider.positionOffset_X = -140;
            MenuSurvivorsAppearanceUI.characterSlider.positionOffset_Y = -120;
            MenuSurvivorsAppearanceUI.characterSlider.positionScale_X  = 0.75f;
            MenuSurvivorsAppearanceUI.characterSlider.positionScale_Y  = 1f;
            MenuSurvivorsAppearanceUI.characterSlider.sizeOffset_X     = 240;
            MenuSurvivorsAppearanceUI.characterSlider.sizeOffset_Y     = 20;
            MenuSurvivorsAppearanceUI.characterSlider.orientation      = ESleekOrientation.HORIZONTAL;
            SleekSlider sleekSlider = MenuSurvivorsAppearanceUI.characterSlider;

            if (MenuSurvivorsAppearanceUI.< > f__mg$cacheC == null)
            {
                MenuSurvivorsAppearanceUI.< > f__mg$cacheC = new Dragged(MenuSurvivorsAppearanceUI.onDraggedCharacterSlider);
            }
            sleekSlider.onDragged = MenuSurvivorsAppearanceUI.< > f__mg$cacheC;
            MenuSurvivorsAppearanceUI.container.add(MenuSurvivorsAppearanceUI.characterSlider);
            MenuSurvivorsAppearanceUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuSurvivorsAppearanceUI.backButton.positionOffset_Y = -50;
            MenuSurvivorsAppearanceUI.backButton.positionScale_Y  = 1f;
            MenuSurvivorsAppearanceUI.backButton.sizeOffset_X     = 200;
            MenuSurvivorsAppearanceUI.backButton.sizeOffset_Y     = 50;
            MenuSurvivorsAppearanceUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuSurvivorsAppearanceUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton14 = MenuSurvivorsAppearanceUI.backButton;

            if (MenuSurvivorsAppearanceUI.< > f__mg$cacheD == null)
            {
                MenuSurvivorsAppearanceUI.< > f__mg$cacheD = new ClickedButton(MenuSurvivorsAppearanceUI.onClickedBackButton);
            }
            sleekButton14.onClickedButton = MenuSurvivorsAppearanceUI.< > f__mg$cacheD;
            MenuSurvivorsAppearanceUI.backButton.fontSize = 14;
            MenuSurvivorsAppearanceUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuSurvivorsAppearanceUI.container.add(MenuSurvivorsAppearanceUI.backButton);
        }
Example #27
0
        // Token: 0x06003556 RID: 13654 RVA: 0x00163B2C File Offset: 0x00161F2C
        public EditorSpawnsUI()
        {
            Local  local  = Localization.read("/Editor/EditorSpawns.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorSpawns/EditorSpawns.unity3d");

            EditorSpawnsUI.container = new Sleek();
            EditorSpawnsUI.container.positionOffset_X = 10;
            EditorSpawnsUI.container.positionOffset_Y = 10;
            EditorSpawnsUI.container.positionScale_X  = 1f;
            EditorSpawnsUI.container.sizeOffset_X     = -20;
            EditorSpawnsUI.container.sizeOffset_Y     = -20;
            EditorSpawnsUI.container.sizeScale_X      = 1f;
            EditorSpawnsUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorSpawnsUI.container);
            EditorSpawnsUI.active        = false;
            EditorSpawnsUI.animalsButton = new SleekButtonIcon((Texture2D)bundle.load("Animals"));
            EditorSpawnsUI.animalsButton.positionOffset_Y = 40;
            EditorSpawnsUI.animalsButton.sizeOffset_X     = -5;
            EditorSpawnsUI.animalsButton.sizeOffset_Y     = 30;
            EditorSpawnsUI.animalsButton.sizeScale_X      = 0.25f;
            EditorSpawnsUI.animalsButton.text             = local.format("AnimalsButtonText");
            EditorSpawnsUI.animalsButton.tooltip          = local.format("AnimalsButtonTooltip");
            SleekButton sleekButton = EditorSpawnsUI.animalsButton;

            if (EditorSpawnsUI.< > f__mg$cache0 == null)
            {
                EditorSpawnsUI.< > f__mg$cache0 = new ClickedButton(EditorSpawnsUI.onClickedAnimalsButton);
            }
            sleekButton.onClickedButton = EditorSpawnsUI.< > f__mg$cache0;
            EditorSpawnsUI.container.add(EditorSpawnsUI.animalsButton);
            EditorSpawnsUI.itemsButton = new SleekButtonIcon((Texture2D)bundle.load("Items"));
            EditorSpawnsUI.itemsButton.positionOffset_X = 5;
            EditorSpawnsUI.itemsButton.positionOffset_Y = 40;
            EditorSpawnsUI.itemsButton.positionScale_X  = 0.25f;
            EditorSpawnsUI.itemsButton.sizeOffset_X     = -10;
            EditorSpawnsUI.itemsButton.sizeOffset_Y     = 30;
            EditorSpawnsUI.itemsButton.sizeScale_X      = 0.25f;
            EditorSpawnsUI.itemsButton.text             = local.format("ItemsButtonText");
            EditorSpawnsUI.itemsButton.tooltip          = local.format("ItemsButtonTooltip");
            SleekButton sleekButton2 = EditorSpawnsUI.itemsButton;

            if (EditorSpawnsUI.< > f__mg$cache1 == null)
            {
                EditorSpawnsUI.< > f__mg$cache1 = new ClickedButton(EditorSpawnsUI.onClickItemsButton);
            }
            sleekButton2.onClickedButton = EditorSpawnsUI.< > f__mg$cache1;
            EditorSpawnsUI.container.add(EditorSpawnsUI.itemsButton);
            EditorSpawnsUI.zombiesButton = new SleekButtonIcon((Texture2D)bundle.load("Zombies"));
            EditorSpawnsUI.zombiesButton.positionOffset_X = 5;
            EditorSpawnsUI.zombiesButton.positionOffset_Y = 40;
            EditorSpawnsUI.zombiesButton.positionScale_X  = 0.5f;
            EditorSpawnsUI.zombiesButton.sizeOffset_X     = -10;
            EditorSpawnsUI.zombiesButton.sizeOffset_Y     = 30;
            EditorSpawnsUI.zombiesButton.sizeScale_X      = 0.25f;
            EditorSpawnsUI.zombiesButton.text             = local.format("ZombiesButtonText");
            EditorSpawnsUI.zombiesButton.tooltip          = local.format("ZombiesButtonTooltip");
            SleekButton sleekButton3 = EditorSpawnsUI.zombiesButton;

            if (EditorSpawnsUI.< > f__mg$cache2 == null)
            {
                EditorSpawnsUI.< > f__mg$cache2 = new ClickedButton(EditorSpawnsUI.onClickedZombiesButton);
            }
            sleekButton3.onClickedButton = EditorSpawnsUI.< > f__mg$cache2;
            EditorSpawnsUI.container.add(EditorSpawnsUI.zombiesButton);
            EditorSpawnsUI.vehiclesButton = new SleekButtonIcon((Texture2D)bundle.load("Vehicles"));
            EditorSpawnsUI.vehiclesButton.positionOffset_X = 5;
            EditorSpawnsUI.vehiclesButton.positionOffset_Y = 40;
            EditorSpawnsUI.vehiclesButton.positionScale_X  = 0.75f;
            EditorSpawnsUI.vehiclesButton.sizeOffset_X     = -5;
            EditorSpawnsUI.vehiclesButton.sizeOffset_Y     = 30;
            EditorSpawnsUI.vehiclesButton.sizeScale_X      = 0.25f;
            EditorSpawnsUI.vehiclesButton.text             = local.format("VehiclesButtonText");
            EditorSpawnsUI.vehiclesButton.tooltip          = local.format("VehiclesButtonTooltip");
            SleekButton sleekButton4 = EditorSpawnsUI.vehiclesButton;

            if (EditorSpawnsUI.< > f__mg$cache3 == null)
            {
                EditorSpawnsUI.< > f__mg$cache3 = new ClickedButton(EditorSpawnsUI.onClickedVehiclesButton);
            }
            sleekButton4.onClickedButton = EditorSpawnsUI.< > f__mg$cache3;
            EditorSpawnsUI.container.add(EditorSpawnsUI.vehiclesButton);
            bundle.unload();
            new EditorSpawnsAnimalsUI();
            new EditorSpawnsItemsUI();
            new EditorSpawnsZombiesUI();
            new EditorSpawnsVehiclesUI();
        }
Example #28
0
        public MenuPlayConnectUI()
        {
            MenuPlayConnectUI.localization = Localization.read("/Menu/Play/MenuPlayConnect.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Menu/Icons/Play/MenuPlayConnect/MenuPlayConnect.unity3d");

            MenuPlayConnectUI.container = new Sleek();
            MenuPlayConnectUI.container.positionOffset_X = 10;
            MenuPlayConnectUI.container.positionOffset_Y = 10;
            MenuPlayConnectUI.container.positionScale_Y  = 1f;
            MenuPlayConnectUI.container.sizeOffset_X     = -20;
            MenuPlayConnectUI.container.sizeOffset_Y     = -20;
            MenuPlayConnectUI.container.sizeScale_X      = 1f;
            MenuPlayConnectUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuPlayConnectUI.container);
            MenuPlayConnectUI.active  = false;
            MenuPlayConnectUI.ipField = new SleekField();
            MenuPlayConnectUI.ipField.positionOffset_X = -100;
            MenuPlayConnectUI.ipField.positionOffset_Y = -75;
            MenuPlayConnectUI.ipField.positionScale_X  = 0.5f;
            MenuPlayConnectUI.ipField.positionScale_Y  = 0.5f;
            MenuPlayConnectUI.ipField.sizeOffset_X     = 200;
            MenuPlayConnectUI.ipField.sizeOffset_Y     = 30;
            MenuPlayConnectUI.ipField.maxLength        = 64;
            MenuPlayConnectUI.ipField.addLabel(MenuPlayConnectUI.localization.format("IP_Field_Label"), ESleekSide.RIGHT);
            MenuPlayConnectUI.ipField.text = PlaySettings.connectIP;
            SleekField sleekField = MenuPlayConnectUI.ipField;

            if (MenuPlayConnectUI.< > f__mg$cache0 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache0 = new Typed(MenuPlayConnectUI.onTypedIPField);
            }
            sleekField.onTyped = MenuPlayConnectUI.< > f__mg$cache0;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.ipField);
            MenuPlayConnectUI.portField = new SleekUInt16Field();
            MenuPlayConnectUI.portField.positionOffset_X = -100;
            MenuPlayConnectUI.portField.positionOffset_Y = -35;
            MenuPlayConnectUI.portField.positionScale_X  = 0.5f;
            MenuPlayConnectUI.portField.positionScale_Y  = 0.5f;
            MenuPlayConnectUI.portField.sizeOffset_X     = 200;
            MenuPlayConnectUI.portField.sizeOffset_Y     = 30;
            MenuPlayConnectUI.portField.addLabel(MenuPlayConnectUI.localization.format("Port_Field_Label"), ESleekSide.RIGHT);
            MenuPlayConnectUI.portField.state = PlaySettings.connectPort;
            SleekUInt16Field sleekUInt16Field = MenuPlayConnectUI.portField;

            if (MenuPlayConnectUI.< > f__mg$cache1 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache1 = new TypedUInt16(MenuPlayConnectUI.onTypedPortField);
            }
            sleekUInt16Field.onTypedUInt16 = MenuPlayConnectUI.< > f__mg$cache1;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.portField);
            MenuPlayConnectUI.passwordField = new SleekField();
            MenuPlayConnectUI.passwordField.positionOffset_X = -100;
            MenuPlayConnectUI.passwordField.positionOffset_Y = 5;
            MenuPlayConnectUI.passwordField.positionScale_X  = 0.5f;
            MenuPlayConnectUI.passwordField.positionScale_Y  = 0.5f;
            MenuPlayConnectUI.passwordField.sizeOffset_X     = 200;
            MenuPlayConnectUI.passwordField.sizeOffset_Y     = 30;
            MenuPlayConnectUI.passwordField.addLabel(MenuPlayConnectUI.localization.format("Password_Field_Label"), ESleekSide.RIGHT);
            MenuPlayConnectUI.passwordField.replace = MenuPlayConnectUI.localization.format("Password_Field_Replace").ToCharArray()[0];
            MenuPlayConnectUI.passwordField.text    = PlaySettings.connectPassword;
            SleekField sleekField2 = MenuPlayConnectUI.passwordField;

            if (MenuPlayConnectUI.< > f__mg$cache2 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache2 = new Typed(MenuPlayConnectUI.onTypedPasswordField);
            }
            sleekField2.onTyped = MenuPlayConnectUI.< > f__mg$cache2;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.passwordField);
            MenuPlayConnectUI.connectButton = new SleekButtonIcon((Texture2D)bundle.load("Connect"));
            MenuPlayConnectUI.connectButton.positionOffset_X         = -100;
            MenuPlayConnectUI.connectButton.positionOffset_Y         = 45;
            MenuPlayConnectUI.connectButton.positionScale_X          = 0.5f;
            MenuPlayConnectUI.connectButton.positionScale_Y          = 0.5f;
            MenuPlayConnectUI.connectButton.sizeOffset_X             = 200;
            MenuPlayConnectUI.connectButton.sizeOffset_Y             = 30;
            MenuPlayConnectUI.connectButton.text                     = MenuPlayConnectUI.localization.format("Connect_Button");
            MenuPlayConnectUI.connectButton.tooltip                  = MenuPlayConnectUI.localization.format("Connect_Button_Tooltip");
            MenuPlayConnectUI.connectButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            SleekButton sleekButton = MenuPlayConnectUI.connectButton;

            if (MenuPlayConnectUI.< > f__mg$cache3 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache3 = new ClickedButton(MenuPlayConnectUI.onClickedConnectButton);
            }
            sleekButton.onClickedButton = MenuPlayConnectUI.< > f__mg$cache3;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.connectButton);
            TempSteamworksMatchmaking matchmakingService = Provider.provider.matchmakingService;

            if (MenuPlayConnectUI.< > f__mg$cache4 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache4 = new TempSteamworksMatchmaking.AttemptUpdated(MenuPlayConnectUI.onAttemptUpdated);
            }
            matchmakingService.onAttemptUpdated = MenuPlayConnectUI.< > f__mg$cache4;
            TempSteamworksMatchmaking matchmakingService2 = Provider.provider.matchmakingService;

            if (MenuPlayConnectUI.< > f__mg$cache5 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache5 = new TempSteamworksMatchmaking.TimedOut(MenuPlayConnectUI.onTimedOut);
            }
            matchmakingService2.onTimedOut = MenuPlayConnectUI.< > f__mg$cache5;
            if (!MenuPlayConnectUI.isLaunched)
            {
                MenuPlayConnectUI.isLaunched = true;
                uint   newIP;
                ushort newPort;
                string newPassword;
                ulong  num;
                if (CommandLine.tryGetConnect(Environment.CommandLine, out newIP, out newPort, out newPassword))
                {
                    SteamConnectionInfo steamConnectionInfo = new SteamConnectionInfo(newIP, newPort, newPassword);
                    Debug.Log(string.Concat(new object[]
                    {
                        steamConnectionInfo.ip,
                        " ",
                        Parser.getIPFromUInt32(steamConnectionInfo.ip),
                        " ",
                        steamConnectionInfo.port,
                        " ",
                        steamConnectionInfo.password
                    }));
                    Provider.provider.matchmakingService.connect(steamConnectionInfo);
                    MenuUI.openAlert(MenuPlayConnectUI.localization.format("Connecting"));
                }
                else if (CommandLine.tryGetLobby(Environment.CommandLine, out num))
                {
                    Debug.Log("Lobby: " + num);
                    Lobbies.joinLobby(new CSteamID(num));
                }
            }
            bundle.unload();
            MenuPlayConnectUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuPlayConnectUI.backButton.positionOffset_Y = -50;
            MenuPlayConnectUI.backButton.positionScale_Y  = 1f;
            MenuPlayConnectUI.backButton.sizeOffset_X     = 200;
            MenuPlayConnectUI.backButton.sizeOffset_Y     = 50;
            MenuPlayConnectUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuPlayConnectUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton2 = MenuPlayConnectUI.backButton;

            if (MenuPlayConnectUI.< > f__mg$cache6 == null)
            {
                MenuPlayConnectUI.< > f__mg$cache6 = new ClickedButton(MenuPlayConnectUI.onClickedBackButton);
            }
            sleekButton2.onClickedButton          = MenuPlayConnectUI.< > f__mg$cache6;
            MenuPlayConnectUI.backButton.fontSize = 14;
            MenuPlayConnectUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuPlayConnectUI.container.add(MenuPlayConnectUI.backButton);
        }
        // Token: 0x0600355D RID: 13661 RVA: 0x00163FC4 File Offset: 0x001623C4
        public EditorSpawnsVehiclesUI()
        {
            Local  local  = Localization.read("/Editor/EditorSpawnsVehicles.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorSpawnsVehicles/EditorSpawnsVehicles.unity3d");

            EditorSpawnsVehiclesUI.container = new Sleek();
            EditorSpawnsVehiclesUI.container.positionOffset_X = 10;
            EditorSpawnsVehiclesUI.container.positionOffset_Y = 10;
            EditorSpawnsVehiclesUI.container.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.container.sizeOffset_X     = -20;
            EditorSpawnsVehiclesUI.container.sizeOffset_Y     = -20;
            EditorSpawnsVehiclesUI.container.sizeScale_X      = 1f;
            EditorSpawnsVehiclesUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorSpawnsVehiclesUI.container);
            EditorSpawnsVehiclesUI.active         = false;
            EditorSpawnsVehiclesUI.tableScrollBox = new SleekScrollBox();
            EditorSpawnsVehiclesUI.tableScrollBox.positionOffset_X = -470;
            EditorSpawnsVehiclesUI.tableScrollBox.positionOffset_Y = 120;
            EditorSpawnsVehiclesUI.tableScrollBox.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.tableScrollBox.sizeOffset_X     = 470;
            EditorSpawnsVehiclesUI.tableScrollBox.sizeOffset_Y     = 200;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.tableScrollBox);
            EditorSpawnsVehiclesUI.tableNameField = new SleekField();
            EditorSpawnsVehiclesUI.tableNameField.positionOffset_X = -230;
            EditorSpawnsVehiclesUI.tableNameField.positionOffset_Y = 330;
            EditorSpawnsVehiclesUI.tableNameField.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.tableNameField.sizeOffset_X     = 230;
            EditorSpawnsVehiclesUI.tableNameField.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.tableNameField.maxLength        = 64;
            EditorSpawnsVehiclesUI.tableNameField.addLabel(local.format("TableNameFieldLabelText"), ESleekSide.LEFT);
            SleekField sleekField = EditorSpawnsVehiclesUI.tableNameField;
            Delegate   onTyped    = sleekField.onTyped;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache4 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache4 = new Typed(EditorSpawnsVehiclesUI.onTypedNameField);
            }
            sleekField.onTyped = (Typed)Delegate.Combine(onTyped, EditorSpawnsVehiclesUI.< > f__mg$cache4);
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.tableNameField);
            EditorSpawnsVehiclesUI.addTableButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorSpawnsVehiclesUI.addTableButton.positionOffset_X = -230;
            EditorSpawnsVehiclesUI.addTableButton.positionOffset_Y = 370;
            EditorSpawnsVehiclesUI.addTableButton.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.addTableButton.sizeOffset_X     = 110;
            EditorSpawnsVehiclesUI.addTableButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.addTableButton.text             = local.format("AddTableButtonText");
            EditorSpawnsVehiclesUI.addTableButton.tooltip          = local.format("AddTableButtonTooltip");
            SleekButton sleekButton = EditorSpawnsVehiclesUI.addTableButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache5 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache5 = new ClickedButton(EditorSpawnsVehiclesUI.onClickedAddTableButton);
            }
            sleekButton.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cache5;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.addTableButton);
            EditorSpawnsVehiclesUI.removeTableButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorSpawnsVehiclesUI.removeTableButton.positionOffset_X = -110;
            EditorSpawnsVehiclesUI.removeTableButton.positionOffset_Y = 370;
            EditorSpawnsVehiclesUI.removeTableButton.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.removeTableButton.sizeOffset_X     = 110;
            EditorSpawnsVehiclesUI.removeTableButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.removeTableButton.text             = local.format("RemoveTableButtonText");
            EditorSpawnsVehiclesUI.removeTableButton.tooltip          = local.format("RemoveTableButtonTooltip");
            SleekButton sleekButton2 = EditorSpawnsVehiclesUI.removeTableButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache6 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache6 = new ClickedButton(EditorSpawnsVehiclesUI.onClickedRemoveTableButton);
            }
            sleekButton2.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cache6;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.removeTableButton);
            EditorSpawnsVehiclesUI.updateTables();
            EditorSpawnsVehiclesUI.spawnsScrollBox = new SleekScrollBox();
            EditorSpawnsVehiclesUI.spawnsScrollBox.positionOffset_X = -470;
            EditorSpawnsVehiclesUI.spawnsScrollBox.positionOffset_Y = 410;
            EditorSpawnsVehiclesUI.spawnsScrollBox.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.spawnsScrollBox.sizeOffset_X     = 470;
            EditorSpawnsVehiclesUI.spawnsScrollBox.sizeOffset_Y     = -410;
            EditorSpawnsVehiclesUI.spawnsScrollBox.sizeScale_Y      = 1f;
            EditorSpawnsVehiclesUI.spawnsScrollBox.area             = new Rect(0f, 0f, 5f, 1000f);
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.spawnsScrollBox);
            EditorSpawnsVehiclesUI.tableColorPicker = new SleekColorPicker();
            EditorSpawnsVehiclesUI.tableColorPicker.positionOffset_X = 200;
            SleekColorPicker sleekColorPicker = EditorSpawnsVehiclesUI.tableColorPicker;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache7 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache7 = new ColorPicked(EditorSpawnsVehiclesUI.onVehicleColorPicked);
            }
            sleekColorPicker.onColorPicked = EditorSpawnsVehiclesUI.< > f__mg$cache7;
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.tableColorPicker);
            EditorSpawnsVehiclesUI.tableIDField = new SleekUInt16Field();
            EditorSpawnsVehiclesUI.tableIDField.positionOffset_X = 240;
            EditorSpawnsVehiclesUI.tableIDField.positionOffset_Y = 130;
            EditorSpawnsVehiclesUI.tableIDField.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.tableIDField.sizeOffset_Y     = 30;
            SleekUInt16Field sleekUInt16Field = EditorSpawnsVehiclesUI.tableIDField;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache8 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache8 = new TypedUInt16(EditorSpawnsVehiclesUI.onTableIDFieldTyped);
            }
            sleekUInt16Field.onTypedUInt16 = EditorSpawnsVehiclesUI.< > f__mg$cache8;
            EditorSpawnsVehiclesUI.tableIDField.addLabel(local.format("TableIDFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.tableIDField);
            EditorSpawnsVehiclesUI.tierNameField = new SleekField();
            EditorSpawnsVehiclesUI.tierNameField.positionOffset_X = 240;
            EditorSpawnsVehiclesUI.tierNameField.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.tierNameField.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.tierNameField.maxLength        = 64;
            EditorSpawnsVehiclesUI.tierNameField.addLabel(local.format("TierNameFieldLabelText"), ESleekSide.LEFT);
            SleekField sleekField2 = EditorSpawnsVehiclesUI.tierNameField;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache9 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache9 = new Typed(EditorSpawnsVehiclesUI.onTypedTierNameField);
            }
            sleekField2.onTyped = EditorSpawnsVehiclesUI.< > f__mg$cache9;
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.tierNameField);
            EditorSpawnsVehiclesUI.addTierButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorSpawnsVehiclesUI.addTierButton.positionOffset_X = 240;
            EditorSpawnsVehiclesUI.addTierButton.sizeOffset_X     = 95;
            EditorSpawnsVehiclesUI.addTierButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.addTierButton.text             = local.format("AddTierButtonText");
            EditorSpawnsVehiclesUI.addTierButton.tooltip          = local.format("AddTierButtonTooltip");
            SleekButton sleekButton3 = EditorSpawnsVehiclesUI.addTierButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cacheA == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cacheA = new ClickedButton(EditorSpawnsVehiclesUI.onClickedAddTierButton);
            }
            sleekButton3.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cacheA;
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.addTierButton);
            EditorSpawnsVehiclesUI.removeTierButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorSpawnsVehiclesUI.removeTierButton.positionOffset_X = 345;
            EditorSpawnsVehiclesUI.removeTierButton.sizeOffset_X     = 95;
            EditorSpawnsVehiclesUI.removeTierButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.removeTierButton.text             = local.format("RemoveTierButtonText");
            EditorSpawnsVehiclesUI.removeTierButton.tooltip          = local.format("RemoveTierButtonTooltip");
            SleekButton sleekButton4 = EditorSpawnsVehiclesUI.removeTierButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cacheB == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cacheB = new ClickedButton(EditorSpawnsVehiclesUI.onClickedRemoveTierButton);
            }
            sleekButton4.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cacheB;
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.removeTierButton);
            EditorSpawnsVehiclesUI.vehicleIDField = new SleekUInt16Field();
            EditorSpawnsVehiclesUI.vehicleIDField.positionOffset_X = 240;
            EditorSpawnsVehiclesUI.vehicleIDField.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.vehicleIDField.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.vehicleIDField.addLabel(local.format("VehicleIDFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.vehicleIDField);
            EditorSpawnsVehiclesUI.addVehicleButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorSpawnsVehiclesUI.addVehicleButton.positionOffset_X = 240;
            EditorSpawnsVehiclesUI.addVehicleButton.sizeOffset_X     = 95;
            EditorSpawnsVehiclesUI.addVehicleButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.addVehicleButton.text             = local.format("AddVehicleButtonText");
            EditorSpawnsVehiclesUI.addVehicleButton.tooltip          = local.format("AddVehicleButtonTooltip");
            SleekButton sleekButton5 = EditorSpawnsVehiclesUI.addVehicleButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cacheC == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cacheC = new ClickedButton(EditorSpawnsVehiclesUI.onClickedAddVehicleButton);
            }
            sleekButton5.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cacheC;
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.addVehicleButton);
            EditorSpawnsVehiclesUI.removeVehicleButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorSpawnsVehiclesUI.removeVehicleButton.positionOffset_X = 345;
            EditorSpawnsVehiclesUI.removeVehicleButton.sizeOffset_X     = 95;
            EditorSpawnsVehiclesUI.removeVehicleButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.removeVehicleButton.text             = local.format("RemoveVehicleButtonText");
            EditorSpawnsVehiclesUI.removeVehicleButton.tooltip          = local.format("RemoveVehicleButtonTooltip");
            SleekButton sleekButton6 = EditorSpawnsVehiclesUI.removeVehicleButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cacheD == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cacheD = new ClickedButton(EditorSpawnsVehiclesUI.onClickedRemoveVehicleButton);
            }
            sleekButton6.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cacheD;
            EditorSpawnsVehiclesUI.spawnsScrollBox.add(EditorSpawnsVehiclesUI.removeVehicleButton);
            EditorSpawnsVehiclesUI.selectedBox = new SleekBox();
            EditorSpawnsVehiclesUI.selectedBox.positionOffset_X = -230;
            EditorSpawnsVehiclesUI.selectedBox.positionOffset_Y = 80;
            EditorSpawnsVehiclesUI.selectedBox.positionScale_X  = 1f;
            EditorSpawnsVehiclesUI.selectedBox.sizeOffset_X     = 230;
            EditorSpawnsVehiclesUI.selectedBox.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.selectedBox.addLabel(local.format("SelectionBoxLabelText"), ESleekSide.LEFT);
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.selectedBox);
            EditorSpawnsVehiclesUI.updateSelection();
            EditorSpawnsVehiclesUI.radiusSlider = new SleekSlider();
            EditorSpawnsVehiclesUI.radiusSlider.positionOffset_Y = -130;
            EditorSpawnsVehiclesUI.radiusSlider.positionScale_Y  = 1f;
            EditorSpawnsVehiclesUI.radiusSlider.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.radiusSlider.sizeOffset_Y     = 20;
            EditorSpawnsVehiclesUI.radiusSlider.state            = (float)(EditorSpawns.radius - EditorSpawns.MIN_REMOVE_SIZE) / (float)EditorSpawns.MAX_REMOVE_SIZE;
            EditorSpawnsVehiclesUI.radiusSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorSpawnsVehiclesUI.radiusSlider.addLabel(local.format("RadiusSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider = EditorSpawnsVehiclesUI.radiusSlider;

            if (EditorSpawnsVehiclesUI.< > f__mg$cacheE == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cacheE = new Dragged(EditorSpawnsVehiclesUI.onDraggedRadiusSlider);
            }
            sleekSlider.onDragged = EditorSpawnsVehiclesUI.< > f__mg$cacheE;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.radiusSlider);
            EditorSpawnsVehiclesUI.rotationSlider = new SleekSlider();
            EditorSpawnsVehiclesUI.rotationSlider.positionOffset_Y = -100;
            EditorSpawnsVehiclesUI.rotationSlider.positionScale_Y  = 1f;
            EditorSpawnsVehiclesUI.rotationSlider.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.rotationSlider.sizeOffset_Y     = 20;
            EditorSpawnsVehiclesUI.rotationSlider.state            = EditorSpawns.rotation / 360f;
            EditorSpawnsVehiclesUI.rotationSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorSpawnsVehiclesUI.rotationSlider.addLabel(local.format("RotationSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider2 = EditorSpawnsVehiclesUI.rotationSlider;

            if (EditorSpawnsVehiclesUI.< > f__mg$cacheF == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cacheF = new Dragged(EditorSpawnsVehiclesUI.onDraggedRotationSlider);
            }
            sleekSlider2.onDragged = EditorSpawnsVehiclesUI.< > f__mg$cacheF;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.rotationSlider);
            EditorSpawnsVehiclesUI.addButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorSpawnsVehiclesUI.addButton.positionOffset_Y = -70;
            EditorSpawnsVehiclesUI.addButton.positionScale_Y  = 1f;
            EditorSpawnsVehiclesUI.addButton.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.addButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.addButton.text             = local.format("AddButtonText", new object[]
            {
                ControlsSettings.tool_0
            });
            EditorSpawnsVehiclesUI.addButton.tooltip = local.format("AddButtonTooltip");
            SleekButton sleekButton7 = EditorSpawnsVehiclesUI.addButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache10 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache10 = new ClickedButton(EditorSpawnsVehiclesUI.onClickedAddButton);
            }
            sleekButton7.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cache10;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.addButton);
            EditorSpawnsVehiclesUI.removeButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorSpawnsVehiclesUI.removeButton.positionOffset_Y = -30;
            EditorSpawnsVehiclesUI.removeButton.positionScale_Y  = 1f;
            EditorSpawnsVehiclesUI.removeButton.sizeOffset_X     = 200;
            EditorSpawnsVehiclesUI.removeButton.sizeOffset_Y     = 30;
            EditorSpawnsVehiclesUI.removeButton.text             = local.format("RemoveButtonText", new object[]
            {
                ControlsSettings.tool_1
            });
            EditorSpawnsVehiclesUI.removeButton.tooltip = local.format("RemoveButtonTooltip");
            SleekButton sleekButton8 = EditorSpawnsVehiclesUI.removeButton;

            if (EditorSpawnsVehiclesUI.< > f__mg$cache11 == null)
            {
                EditorSpawnsVehiclesUI.< > f__mg$cache11 = new ClickedButton(EditorSpawnsVehiclesUI.onClickedRemoveButton);
            }
            sleekButton8.onClickedButton = EditorSpawnsVehiclesUI.< > f__mg$cache11;
            EditorSpawnsVehiclesUI.container.add(EditorSpawnsVehiclesUI.removeButton);
            bundle.unload();
        }
        public EditorTerrainHeightUI()
        {
            Local  local  = Localization.read("/Editor/EditorTerrainHeight.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrainHeight/EditorTerrainHeight.unity3d");

            EditorTerrainHeightUI.container = new Sleek();
            EditorTerrainHeightUI.container.positionOffset_X = 10;
            EditorTerrainHeightUI.container.positionOffset_Y = 10;
            EditorTerrainHeightUI.container.positionScale_X  = 1f;
            EditorTerrainHeightUI.container.sizeOffset_X     = -20;
            EditorTerrainHeightUI.container.sizeOffset_Y     = -20;
            EditorTerrainHeightUI.container.sizeScale_X      = 1f;
            EditorTerrainHeightUI.container.sizeScale_Y      = 1f;
            EditorUI.window.add(EditorTerrainHeightUI.container);
            EditorTerrainHeightUI.active         = false;
            EditorTerrainHeightUI.adjustUpButton = new SleekButtonIcon((Texture2D)bundle.load("Adjust_Up"));
            EditorTerrainHeightUI.adjustUpButton.positionOffset_Y = -190;
            EditorTerrainHeightUI.adjustUpButton.positionScale_Y  = 1f;
            EditorTerrainHeightUI.adjustUpButton.sizeOffset_X     = 200;
            EditorTerrainHeightUI.adjustUpButton.sizeOffset_Y     = 30;
            EditorTerrainHeightUI.adjustUpButton.text             = local.format("AdjustUpButtonText", new object[]
            {
                ControlsSettings.tool_0
            });
            EditorTerrainHeightUI.adjustUpButton.tooltip = local.format("AdjustUpButtonTooltip");
            SleekButton sleekButton = EditorTerrainHeightUI.adjustUpButton;

            if (EditorTerrainHeightUI.< > f__mg$cache0 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainHeightUI.onClickedAdjustUpButton);
            }
            sleekButton.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache0;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.adjustUpButton);
            EditorTerrainHeightUI.adjustDownButton = new SleekButtonIcon((Texture2D)bundle.load("Adjust_Down"));
            EditorTerrainHeightUI.adjustDownButton.positionOffset_Y = -150;
            EditorTerrainHeightUI.adjustDownButton.positionScale_Y  = 1f;
            EditorTerrainHeightUI.adjustDownButton.sizeOffset_X     = 200;
            EditorTerrainHeightUI.adjustDownButton.sizeOffset_Y     = 30;
            EditorTerrainHeightUI.adjustDownButton.text             = local.format("AdjustDownButtonText", new object[]
            {
                ControlsSettings.tool_0
            });
            EditorTerrainHeightUI.adjustDownButton.tooltip = local.format("AdjustDownButtonTooltip");
            SleekButton sleekButton2 = EditorTerrainHeightUI.adjustDownButton;

            if (EditorTerrainHeightUI.< > f__mg$cache1 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache1 = new ClickedButton(EditorTerrainHeightUI.onClickedAdjustDownButton);
            }
            sleekButton2.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache1;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.adjustDownButton);
            EditorTerrainHeightUI.smoothButton = new SleekButtonIcon((Texture2D)bundle.load("Smooth"));
            EditorTerrainHeightUI.smoothButton.positionOffset_Y = -110;
            EditorTerrainHeightUI.smoothButton.positionScale_Y  = 1f;
            EditorTerrainHeightUI.smoothButton.sizeOffset_X     = 200;
            EditorTerrainHeightUI.smoothButton.sizeOffset_Y     = 30;
            EditorTerrainHeightUI.smoothButton.text             = local.format("SmoothButtonText", new object[]
            {
                ControlsSettings.tool_1
            });
            EditorTerrainHeightUI.smoothButton.tooltip = local.format("SmoothButtonTooltip");
            SleekButton sleekButton3 = EditorTerrainHeightUI.smoothButton;

            if (EditorTerrainHeightUI.< > f__mg$cache2 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache2 = new ClickedButton(EditorTerrainHeightUI.onClickedSmoothButton);
            }
            sleekButton3.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache2;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.smoothButton);
            EditorTerrainHeightUI.flattenButton = new SleekButtonIcon((Texture2D)bundle.load("Flatten"));
            EditorTerrainHeightUI.flattenButton.positionOffset_Y = -70;
            EditorTerrainHeightUI.flattenButton.positionScale_Y  = 1f;
            EditorTerrainHeightUI.flattenButton.sizeOffset_X     = 200;
            EditorTerrainHeightUI.flattenButton.sizeOffset_Y     = 30;
            EditorTerrainHeightUI.flattenButton.text             = local.format("FlattenButtonText", new object[]
            {
                ControlsSettings.tool_2
            });
            EditorTerrainHeightUI.flattenButton.tooltip = local.format("FlattenButtonTooltip");
            SleekButton sleekButton4 = EditorTerrainHeightUI.flattenButton;

            if (EditorTerrainHeightUI.< > f__mg$cache3 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache3 = new ClickedButton(EditorTerrainHeightUI.onClickedFlattenButton);
            }
            sleekButton4.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache3;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.flattenButton);
            EditorTerrainHeightUI.map2Button = new SleekButtonState(new GUIContent[]
            {
                new GUIContent(local.format("Map2ButtonText1")),
                new GUIContent(local.format("Map2ButtonText2"))
            });
            EditorTerrainHeightUI.map2Button.positionOffset_Y = -30;
            EditorTerrainHeightUI.map2Button.positionScale_Y  = 1f;
            EditorTerrainHeightUI.map2Button.sizeOffset_X     = 200;
            EditorTerrainHeightUI.map2Button.sizeOffset_Y     = 30;
            EditorTerrainHeightUI.map2Button.tooltip          = local.format("Map2ButtonTooltip");
            SleekButtonState sleekButtonState = EditorTerrainHeightUI.map2Button;

            if (EditorTerrainHeightUI.< > f__mg$cache4 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache4 = new SwappedState(EditorTerrainHeightUI.onSwappedMap2);
            }
            sleekButtonState.onSwappedState = EditorTerrainHeightUI.< > f__mg$cache4;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.map2Button);
            EditorTerrainHeightUI.noiseSlider = new SleekSlider();
            EditorTerrainHeightUI.noiseSlider.positionOffset_Y = -320;
            EditorTerrainHeightUI.noiseSlider.positionScale_Y  = 1f;
            EditorTerrainHeightUI.noiseSlider.sizeOffset_X     = 200;
            EditorTerrainHeightUI.noiseSlider.sizeOffset_Y     = 20;
            EditorTerrainHeightUI.noiseSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainHeightUI.noiseSlider.state            = EditorTerrainHeight.brushNoise;
            EditorTerrainHeightUI.noiseSlider.addLabel(local.format("NoiseSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider = EditorTerrainHeightUI.noiseSlider;

            if (EditorTerrainHeightUI.< > f__mg$cache5 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache5 = new Dragged(EditorTerrainHeightUI.onDraggedNoiseSlider);
            }
            sleekSlider.onDragged = EditorTerrainHeightUI.< > f__mg$cache5;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.noiseSlider);
            EditorTerrainHeightUI.sizeSlider = new SleekSlider();
            EditorTerrainHeightUI.sizeSlider.positionOffset_Y = -290;
            EditorTerrainHeightUI.sizeSlider.positionScale_Y  = 1f;
            EditorTerrainHeightUI.sizeSlider.sizeOffset_X     = 200;
            EditorTerrainHeightUI.sizeSlider.sizeOffset_Y     = 20;
            EditorTerrainHeightUI.sizeSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainHeightUI.sizeSlider.state            = (float)(EditorTerrainHeight.brushSize - EditorTerrainHeight.MIN_BRUSH_SIZE) / (float)EditorTerrainHeight.MAX_BRUSH_SIZE;
            EditorTerrainHeightUI.sizeSlider.addLabel(local.format("SizeSliderLabelText"), ESleekSide.RIGHT);
            SleekSlider sleekSlider2 = EditorTerrainHeightUI.sizeSlider;

            if (EditorTerrainHeightUI.< > f__mg$cache6 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache6 = new Dragged(EditorTerrainHeightUI.onDraggedSizeSlider);
            }
            sleekSlider2.onDragged = EditorTerrainHeightUI.< > f__mg$cache6;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.sizeSlider);
            EditorTerrainHeightUI.strengthSlider = new SleekSlider();
            EditorTerrainHeightUI.strengthSlider.positionOffset_Y = -260;
            EditorTerrainHeightUI.strengthSlider.positionScale_Y  = 1f;
            EditorTerrainHeightUI.strengthSlider.sizeOffset_X     = 200;
            EditorTerrainHeightUI.strengthSlider.sizeOffset_Y     = 20;
            EditorTerrainHeightUI.strengthSlider.orientation      = ESleekOrientation.HORIZONTAL;
            EditorTerrainHeightUI.strengthSlider.addLabel(local.format("StrengthSliderLabelText"), ESleekSide.RIGHT);
            EditorTerrainHeightUI.strengthSlider.state = EditorTerrainHeight.brushStrength;
            SleekSlider sleekSlider3 = EditorTerrainHeightUI.strengthSlider;

            if (EditorTerrainHeightUI.< > f__mg$cache7 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache7 = new Dragged(EditorTerrainHeightUI.onDraggedStrengthSlider);
            }
            sleekSlider3.onDragged = EditorTerrainHeightUI.< > f__mg$cache7;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.strengthSlider);
            EditorTerrainHeightUI.heightValue = new SleekValue();
            EditorTerrainHeightUI.heightValue.positionOffset_Y = -230;
            EditorTerrainHeightUI.heightValue.positionScale_Y  = 1f;
            EditorTerrainHeightUI.heightValue.sizeOffset_X     = 200;
            EditorTerrainHeightUI.heightValue.sizeOffset_Y     = 30;
            EditorTerrainHeightUI.heightValue.addLabel(local.format("HeightValueLabelText"), ESleekSide.RIGHT);
            EditorTerrainHeightUI.heightValue.state = EditorTerrainHeight.brushHeight;
            SleekValue sleekValue = EditorTerrainHeightUI.heightValue;

            if (EditorTerrainHeightUI.< > f__mg$cache8 == null)
            {
                EditorTerrainHeightUI.< > f__mg$cache8 = new Valued(EditorTerrainHeightUI.onValuedHeightValue);
            }
            sleekValue.onValued = EditorTerrainHeightUI.< > f__mg$cache8;
            EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.heightValue);
            bundle.unload();
        }