Пример #1
0
        /// <summary>
        /// Performs a color pick at the specified image coordinates.
        /// If the coordinates at not within the image area, nothing is done
        /// </summary>
        /// <param name="point">The point ot color pick at</param>
        /// <param name="colorIndex">The color index to pick for</param>
        protected void ColorPickAtPoint(Point point, ColorIndex colorIndex)
        {
            if (!WithinBounds(point))
            {
                return;
            }

            ColorPicked?.Invoke(this, new PaintToolColorPickedEventArgs(point, colorIndex));
        }
        private void Window_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var mouse        = MouseUtil.GetMousePosition();
            var compensatedX = mouse.X - SystemInformation.VirtualScreen.Left; // Compensate for potential negative position on multi-monitor
            var compensatedY = mouse.Y - SystemInformation.VirtualScreen.Top;  // Compensate for potential negative position on multi-monitor
            var rgb          = BitmapUtil.PixelToRgb(FreezeFrame.Instance.BitmapSource, compensatedX, compensatedY);

            _vm.RefreshFromRgb(rgb);
            ColorPicked?.Invoke(this, EventArgs.Empty);
            Close();
        }
Пример #3
0
        private void PickColor(Color color)
        {
            currentColor = color;

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, null);
            }

            Invalidate();
        }
Пример #4
0
        private void PickColor(Color color)
        {
            selectedColorIndex = hoverColorIndex;
            currentColor       = color;

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, null);
            }

            Invalidate();
        }
Пример #5
0
        void dropPanel_ColorPicked(object sender, EventArgs e)
        {
            currentColor = dropPanel.CurrentColor;
            dropPanel.Hide();

            SolidColorPickerPanel.AddRecentColor(currentColor);

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, new EventArgs());
            }
        }
Пример #6
0
 private void Grid_PointerReleased(object sender, PointerRoutedEventArgs e)
 {
     if (isDragging)
     {
         isDragging = false;
         var element = sender as FrameworkElement;
         var hs      = GetHS(e.GetCurrentPoint(element).Position);
         Hue        = hs.Hue;
         Saturation = hs.Saturation;
         ColorPicked?.Invoke(this, new HS()
         {
             Hue = hs.Hue, Saturation = hs.Saturation
         });
     }
 }
Пример #7
0
        void dropPanel_ColorPicked(object sender, EventArgs e)
        {
            currentColor = dropPanel.CurrentColor;

            //if (currentColor is SolidColor)
            //{
            //	dropPanel.Visible = false;
            //}

            Invalidate();

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, new EventArgs());
            }
        }
        void dropPanel_ColorPicked(object sender, EventArgs e)
        {
            currentColor = dropPanel.CurrentColor;

            if (CloseOnClick && currentColor is SolidColor)
            {
                dropPanel.Close(ToolStripDropDownCloseReason.ItemClicked);
            }

            Invalidate();

            if (currentColor is SolidColor)
            {
                SolidColorPickerPanel.AddRecentColor(((SolidColor)currentColor).Color);
            }

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, new EventArgs());
            }
        }
        // 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();
        }
Пример #10
0
        // Token: 0x0600376C RID: 14188 RVA: 0x001840FC File Offset: 0x001824FC
        public MenuSurvivorsGroupUI()
        {
            MenuSurvivorsGroupUI.localization = Localization.read("/Menu/Survivors/MenuSurvivorsGroup.dat");
            MenuSurvivorsGroupUI.container    = new Sleek();
            MenuSurvivorsGroupUI.container.positionOffset_X = 10;
            MenuSurvivorsGroupUI.container.positionOffset_Y = 10;
            MenuSurvivorsGroupUI.container.positionScale_Y  = 1f;
            MenuSurvivorsGroupUI.container.sizeOffset_X     = -20;
            MenuSurvivorsGroupUI.container.sizeOffset_Y     = -20;
            MenuSurvivorsGroupUI.container.sizeScale_X      = 1f;
            MenuSurvivorsGroupUI.container.sizeScale_Y      = 1f;
            MenuUI.container.add(MenuSurvivorsGroupUI.container);
            MenuSurvivorsGroupUI.active         = false;
            MenuSurvivorsGroupUI.groups         = Provider.provider.communityService.getGroups();
            MenuSurvivorsGroupUI.markerColorBox = new SleekBox();
            MenuSurvivorsGroupUI.markerColorBox.positionOffset_X = -120;
            MenuSurvivorsGroupUI.markerColorBox.positionOffset_Y = 100;
            MenuSurvivorsGroupUI.markerColorBox.positionScale_X  = 0.75f;
            MenuSurvivorsGroupUI.markerColorBox.sizeOffset_X     = 240;
            MenuSurvivorsGroupUI.markerColorBox.sizeOffset_Y     = 30;
            MenuSurvivorsGroupUI.markerColorBox.text             = MenuSurvivorsGroupUI.localization.format("Marker_Color_Box");
            MenuSurvivorsGroupUI.container.add(MenuSurvivorsGroupUI.markerColorBox);
            MenuSurvivorsGroupUI.markerColorPicker = new SleekColorPicker();
            MenuSurvivorsGroupUI.markerColorPicker.positionOffset_X = -120;
            MenuSurvivorsGroupUI.markerColorPicker.positionOffset_Y = 140;
            MenuSurvivorsGroupUI.markerColorPicker.positionScale_X  = 0.75f;
            SleekColorPicker sleekColorPicker = MenuSurvivorsGroupUI.markerColorPicker;

            if (MenuSurvivorsGroupUI.< > f__mg$cache0 == null)
            {
                MenuSurvivorsGroupUI.< > f__mg$cache0 = new ColorPicked(MenuSurvivorsGroupUI.onPickedMarkerColor);
            }
            sleekColorPicker.onColorPicked = MenuSurvivorsGroupUI.< > f__mg$cache0;
            MenuSurvivorsGroupUI.container.add(MenuSurvivorsGroupUI.markerColorPicker);
            MenuSurvivorsGroupUI.groupButton = new SleekButtonIcon(null, 20);
            MenuSurvivorsGroupUI.groupButton.positionOffset_X = -120;
            MenuSurvivorsGroupUI.groupButton.positionOffset_Y = 270;
            MenuSurvivorsGroupUI.groupButton.positionScale_X  = 0.75f;
            MenuSurvivorsGroupUI.groupButton.sizeOffset_X     = 240;
            MenuSurvivorsGroupUI.groupButton.sizeOffset_Y     = 30;
            MenuSurvivorsGroupUI.groupButton.addLabel(MenuSurvivorsGroupUI.localization.format("Group_Box_Label"), ESleekSide.LEFT);
            SleekButton sleekButton = MenuSurvivorsGroupUI.groupButton;

            if (MenuSurvivorsGroupUI.< > f__mg$cache1 == null)
            {
                MenuSurvivorsGroupUI.< > f__mg$cache1 = new ClickedButton(MenuSurvivorsGroupUI.onClickedUngroupButton);
            }
            sleekButton.onClickedButton = MenuSurvivorsGroupUI.< > f__mg$cache1;
            MenuSurvivorsGroupUI.container.add(MenuSurvivorsGroupUI.groupButton);
            MenuSurvivorsGroupUI.groupsBox = new SleekScrollBox();
            MenuSurvivorsGroupUI.groupsBox.positionOffset_X = -120;
            MenuSurvivorsGroupUI.groupsBox.positionOffset_Y = 310;
            MenuSurvivorsGroupUI.groupsBox.positionScale_X  = 0.75f;
            MenuSurvivorsGroupUI.groupsBox.sizeOffset_X     = 270;
            MenuSurvivorsGroupUI.groupsBox.sizeOffset_Y     = -410;
            MenuSurvivorsGroupUI.groupsBox.sizeScale_Y      = 1f;
            MenuSurvivorsGroupUI.groupsBox.area             = new Rect(0f, 0f, 5f, (float)(MenuSurvivorsGroupUI.groups.Length * 40 - 10));
            MenuSurvivorsGroupUI.container.add(MenuSurvivorsGroupUI.groupsBox);
            for (int i = 0; i < MenuSurvivorsGroupUI.groups.Length; i++)
            {
                SleekButtonIcon sleekButtonIcon = new SleekButtonIcon(MenuSurvivorsGroupUI.groups[i].icon, 20);
                sleekButtonIcon.positionOffset_Y = i * 40;
                sleekButtonIcon.sizeOffset_X     = 240;
                sleekButtonIcon.sizeOffset_Y     = 30;
                sleekButtonIcon.text             = MenuSurvivorsGroupUI.groups[i].name;
                SleekButton sleekButton2 = sleekButtonIcon;
                if (MenuSurvivorsGroupUI.< > f__mg$cache2 == null)
                {
                    MenuSurvivorsGroupUI.< > f__mg$cache2 = new ClickedButton(MenuSurvivorsGroupUI.onClickedGroupButton);
                }
                sleekButton2.onClickedButton = MenuSurvivorsGroupUI.< > f__mg$cache2;
                MenuSurvivorsGroupUI.groupsBox.add(sleekButtonIcon);
            }
            Delegate onCharacterUpdated = Characters.onCharacterUpdated;

            if (MenuSurvivorsGroupUI.< > f__mg$cache3 == null)
            {
                MenuSurvivorsGroupUI.< > f__mg$cache3 = new CharacterUpdated(MenuSurvivorsGroupUI.onCharacterUpdated);
            }
            Characters.onCharacterUpdated   = (CharacterUpdated)Delegate.Combine(onCharacterUpdated, MenuSurvivorsGroupUI.< > f__mg$cache3);
            MenuSurvivorsGroupUI.backButton = new SleekButtonIcon((Texture2D)MenuDashboardUI.icons.load("Exit"));
            MenuSurvivorsGroupUI.backButton.positionOffset_Y = -50;
            MenuSurvivorsGroupUI.backButton.positionScale_Y  = 1f;
            MenuSurvivorsGroupUI.backButton.sizeOffset_X     = 200;
            MenuSurvivorsGroupUI.backButton.sizeOffset_Y     = 50;
            MenuSurvivorsGroupUI.backButton.text             = MenuDashboardUI.localization.format("BackButtonText");
            MenuSurvivorsGroupUI.backButton.tooltip          = MenuDashboardUI.localization.format("BackButtonTooltip");
            SleekButton sleekButton3 = MenuSurvivorsGroupUI.backButton;

            if (MenuSurvivorsGroupUI.< > f__mg$cache4 == null)
            {
                MenuSurvivorsGroupUI.< > f__mg$cache4 = new ClickedButton(MenuSurvivorsGroupUI.onClickedBackButton);
            }
            sleekButton3.onClickedButton             = MenuSurvivorsGroupUI.< > f__mg$cache4;
            MenuSurvivorsGroupUI.backButton.fontSize = 14;
            MenuSurvivorsGroupUI.backButton.iconImage.backgroundTint = ESleekTint.FOREGROUND;
            MenuSurvivorsGroupUI.container.add(MenuSurvivorsGroupUI.backButton);
        }
Пример #11
0
 void OnColorPicked()
 {
     ColorPicked?.Invoke(this, new EventArgs());
 }
Пример #12
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);
        }
Пример #13
0
 private void OnColorPicked(Color color, bool isSystem)
 {
     ColorPicked?.Invoke(this, new ColorPickedEventArgs(color, isSystem));
 }
Пример #14
0
        public EditorSpawnsZombiesUI()
        {
            EditorSpawnsZombiesUI.localization = Localization.read("/Editor/EditorSpawnsZombies.dat");
            Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorSpawnsZombies/EditorSpawnsZombies.unity3d");

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

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

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

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

            if (EditorSpawnsZombiesUI.< > f__mg$cache7 == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cache7 = new ColorPicked(EditorSpawnsZombiesUI.onZombieColorPicked);
            }
            sleekColorPicker.onColorPicked = EditorSpawnsZombiesUI.< > f__mg$cache7;
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.tableColorPicker);
            EditorSpawnsZombiesUI.megaToggle = new SleekToggle();
            EditorSpawnsZombiesUI.megaToggle.positionOffset_X = 240;
            EditorSpawnsZombiesUI.megaToggle.positionOffset_Y = 130;
            EditorSpawnsZombiesUI.megaToggle.sizeOffset_X     = 40;
            EditorSpawnsZombiesUI.megaToggle.sizeOffset_Y     = 40;
            SleekToggle sleekToggle = EditorSpawnsZombiesUI.megaToggle;

            if (EditorSpawnsZombiesUI.< > f__mg$cache8 == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cache8 = new Toggled(EditorSpawnsZombiesUI.onToggledMegaToggle);
            }
            sleekToggle.onToggled = EditorSpawnsZombiesUI.< > f__mg$cache8;
            EditorSpawnsZombiesUI.megaToggle.addLabel(EditorSpawnsZombiesUI.localization.format("MegaToggleLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.megaToggle);
            EditorSpawnsZombiesUI.healthField = new SleekUInt16Field();
            EditorSpawnsZombiesUI.healthField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.healthField.positionOffset_Y = 180;
            EditorSpawnsZombiesUI.healthField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.healthField.sizeOffset_Y     = 30;
            SleekUInt16Field sleekUInt16Field = EditorSpawnsZombiesUI.healthField;

            if (EditorSpawnsZombiesUI.< > f__mg$cache9 == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cache9 = new TypedUInt16(EditorSpawnsZombiesUI.onHealthFieldTyped);
            }
            sleekUInt16Field.onTypedUInt16 = EditorSpawnsZombiesUI.< > f__mg$cache9;
            EditorSpawnsZombiesUI.healthField.addLabel(EditorSpawnsZombiesUI.localization.format("HealthFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.healthField);
            EditorSpawnsZombiesUI.damageField = new SleekByteField();
            EditorSpawnsZombiesUI.damageField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.damageField.positionOffset_Y = 220;
            EditorSpawnsZombiesUI.damageField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.damageField.sizeOffset_Y     = 30;
            SleekByteField sleekByteField = EditorSpawnsZombiesUI.damageField;

            if (EditorSpawnsZombiesUI.< > f__mg$cacheA == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cacheA = new TypedByte(EditorSpawnsZombiesUI.onDamageFieldTyped);
            }
            sleekByteField.onTypedByte = EditorSpawnsZombiesUI.< > f__mg$cacheA;
            EditorSpawnsZombiesUI.damageField.addLabel(EditorSpawnsZombiesUI.localization.format("DamageFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.damageField);
            EditorSpawnsZombiesUI.lootIndexField = new SleekByteField();
            EditorSpawnsZombiesUI.lootIndexField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.lootIndexField.positionOffset_Y = 260;
            EditorSpawnsZombiesUI.lootIndexField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.lootIndexField.sizeOffset_Y     = 30;
            SleekByteField sleekByteField2 = EditorSpawnsZombiesUI.lootIndexField;

            if (EditorSpawnsZombiesUI.< > f__mg$cacheB == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cacheB = new TypedByte(EditorSpawnsZombiesUI.onLootIndexFieldTyped);
            }
            sleekByteField2.onTypedByte = EditorSpawnsZombiesUI.< > f__mg$cacheB;
            EditorSpawnsZombiesUI.lootIndexField.addLabel(EditorSpawnsZombiesUI.localization.format("LootIndexFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.lootIndexField);
            EditorSpawnsZombiesUI.lootIDField = new SleekUInt16Field();
            EditorSpawnsZombiesUI.lootIDField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.lootIDField.positionOffset_Y = 300;
            EditorSpawnsZombiesUI.lootIDField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.lootIDField.sizeOffset_Y     = 30;
            SleekUInt16Field sleekUInt16Field2 = EditorSpawnsZombiesUI.lootIDField;

            if (EditorSpawnsZombiesUI.< > f__mg$cacheC == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cacheC = new TypedUInt16(EditorSpawnsZombiesUI.onLootIDFieldTyped);
            }
            sleekUInt16Field2.onTypedUInt16 = EditorSpawnsZombiesUI.< > f__mg$cacheC;
            EditorSpawnsZombiesUI.lootIDField.addLabel(EditorSpawnsZombiesUI.localization.format("LootIDFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.lootIDField);
            EditorSpawnsZombiesUI.xpField = new SleekUInt32Field();
            EditorSpawnsZombiesUI.xpField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.xpField.positionOffset_Y = 340;
            EditorSpawnsZombiesUI.xpField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.xpField.sizeOffset_Y     = 30;
            SleekUInt32Field sleekUInt32Field = EditorSpawnsZombiesUI.xpField;

            if (EditorSpawnsZombiesUI.< > f__mg$cacheD == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cacheD = new TypedUInt32(EditorSpawnsZombiesUI.onXPFieldTyped);
            }
            sleekUInt32Field.onTypedUInt32 = EditorSpawnsZombiesUI.< > f__mg$cacheD;
            EditorSpawnsZombiesUI.xpField.addLabel(EditorSpawnsZombiesUI.localization.format("XPFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.xpField);
            EditorSpawnsZombiesUI.regenField = new SleekSingleField();
            EditorSpawnsZombiesUI.regenField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.regenField.positionOffset_Y = 380;
            EditorSpawnsZombiesUI.regenField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.regenField.sizeOffset_Y     = 30;
            SleekSingleField sleekSingleField = EditorSpawnsZombiesUI.regenField;

            if (EditorSpawnsZombiesUI.< > f__mg$cacheE == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cacheE = new TypedSingle(EditorSpawnsZombiesUI.onRegenFieldTyped);
            }
            sleekSingleField.onTypedSingle = EditorSpawnsZombiesUI.< > f__mg$cacheE;
            EditorSpawnsZombiesUI.regenField.addLabel(EditorSpawnsZombiesUI.localization.format("RegenFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.regenField);
            EditorSpawnsZombiesUI.difficultyGUIDField = new SleekField();
            EditorSpawnsZombiesUI.difficultyGUIDField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.difficultyGUIDField.positionOffset_Y = 420;
            EditorSpawnsZombiesUI.difficultyGUIDField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.difficultyGUIDField.sizeOffset_Y     = 30;
            EditorSpawnsZombiesUI.difficultyGUIDField.maxLength        = 32;
            SleekField sleekField2 = EditorSpawnsZombiesUI.difficultyGUIDField;

            if (EditorSpawnsZombiesUI.< > f__mg$cacheF == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cacheF = new Typed(EditorSpawnsZombiesUI.onDifficultyGUIDFieldTyped);
            }
            sleekField2.onTyped = EditorSpawnsZombiesUI.< > f__mg$cacheF;
            EditorSpawnsZombiesUI.difficultyGUIDField.addLabel(EditorSpawnsZombiesUI.localization.format("DifficultyGUIDFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.difficultyGUIDField);
            EditorSpawnsZombiesUI.itemIDField = new SleekUInt16Field();
            EditorSpawnsZombiesUI.itemIDField.positionOffset_X = 240;
            EditorSpawnsZombiesUI.itemIDField.sizeOffset_X     = 200;
            EditorSpawnsZombiesUI.itemIDField.sizeOffset_Y     = 30;
            EditorSpawnsZombiesUI.itemIDField.addLabel(EditorSpawnsZombiesUI.localization.format("ItemIDFieldLabelText"), ESleekSide.LEFT);
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.itemIDField);
            EditorSpawnsZombiesUI.addItemButton = new SleekButtonIcon((Texture2D)bundle.load("Add"));
            EditorSpawnsZombiesUI.addItemButton.positionOffset_X = 240;
            EditorSpawnsZombiesUI.addItemButton.sizeOffset_X     = 95;
            EditorSpawnsZombiesUI.addItemButton.sizeOffset_Y     = 30;
            EditorSpawnsZombiesUI.addItemButton.text             = EditorSpawnsZombiesUI.localization.format("AddItemButtonText");
            EditorSpawnsZombiesUI.addItemButton.tooltip          = EditorSpawnsZombiesUI.localization.format("AddItemButtonTooltip");
            SleekButton sleekButton3 = EditorSpawnsZombiesUI.addItemButton;

            if (EditorSpawnsZombiesUI.< > f__mg$cache10 == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cache10 = new ClickedButton(EditorSpawnsZombiesUI.onClickedAddItemButton);
            }
            sleekButton3.onClickedButton = EditorSpawnsZombiesUI.< > f__mg$cache10;
            EditorSpawnsZombiesUI.spawnsScrollBox.add(EditorSpawnsZombiesUI.addItemButton);
            EditorSpawnsZombiesUI.removeItemButton = new SleekButtonIcon((Texture2D)bundle.load("Remove"));
            EditorSpawnsZombiesUI.removeItemButton.positionOffset_X = 345;
            EditorSpawnsZombiesUI.removeItemButton.sizeOffset_X     = 95;
            EditorSpawnsZombiesUI.removeItemButton.sizeOffset_Y     = 30;
            EditorSpawnsZombiesUI.removeItemButton.text             = EditorSpawnsZombiesUI.localization.format("RemoveItemButtonText");
            EditorSpawnsZombiesUI.removeItemButton.tooltip          = EditorSpawnsZombiesUI.localization.format("RemoveItemButtonTooltip");
            SleekButton sleekButton4 = EditorSpawnsZombiesUI.removeItemButton;

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

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

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

            if (EditorSpawnsZombiesUI.< > f__mg$cache14 == null)
            {
                EditorSpawnsZombiesUI.< > f__mg$cache14 = new ClickedButton(EditorSpawnsZombiesUI.onClickedRemoveButton);
            }
            sleekButton6.onClickedButton = EditorSpawnsZombiesUI.< > f__mg$cache14;
            EditorSpawnsZombiesUI.container.add(EditorSpawnsZombiesUI.removeButton);
            bundle.unload();
        }
        // Token: 0x0600349F RID: 13471 RVA: 0x00159C74 File Offset: 0x00158074
        public EditorEnvironmentLightingUI()
        {
            Local local = Localization.read("/Editor/EditorEnvironmentLighting.dat");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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