public EditorTerrainHeightUI() { Local local = Localization.read("/Editor/EditorTerrainHeight.dat"); Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrainHeight/EditorTerrainHeight.unity3d"); EditorTerrainHeightUI.container = new Sleek(); EditorTerrainHeightUI.container.positionOffset_X = 10; EditorTerrainHeightUI.container.positionOffset_Y = 10; EditorTerrainHeightUI.container.positionScale_X = 1f; EditorTerrainHeightUI.container.sizeOffset_X = -20; EditorTerrainHeightUI.container.sizeOffset_Y = -20; EditorTerrainHeightUI.container.sizeScale_X = 1f; EditorTerrainHeightUI.container.sizeScale_Y = 1f; EditorUI.window.add(EditorTerrainHeightUI.container); EditorTerrainHeightUI.active = false; EditorTerrainHeightUI.adjustUpButton = new SleekButtonIcon((Texture2D)bundle.load("Adjust_Up")); EditorTerrainHeightUI.adjustUpButton.positionOffset_Y = -190; EditorTerrainHeightUI.adjustUpButton.positionScale_Y = 1f; EditorTerrainHeightUI.adjustUpButton.sizeOffset_X = 200; EditorTerrainHeightUI.adjustUpButton.sizeOffset_Y = 30; EditorTerrainHeightUI.adjustUpButton.text = local.format("AdjustUpButtonText", new object[] { ControlsSettings.tool_0 }); EditorTerrainHeightUI.adjustUpButton.tooltip = local.format("AdjustUpButtonTooltip"); SleekButton sleekButton = EditorTerrainHeightUI.adjustUpButton; if (EditorTerrainHeightUI.< > f__mg$cache0 == null) { EditorTerrainHeightUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainHeightUI.onClickedAdjustUpButton); } sleekButton.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache0; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.adjustUpButton); EditorTerrainHeightUI.adjustDownButton = new SleekButtonIcon((Texture2D)bundle.load("Adjust_Down")); EditorTerrainHeightUI.adjustDownButton.positionOffset_Y = -150; EditorTerrainHeightUI.adjustDownButton.positionScale_Y = 1f; EditorTerrainHeightUI.adjustDownButton.sizeOffset_X = 200; EditorTerrainHeightUI.adjustDownButton.sizeOffset_Y = 30; EditorTerrainHeightUI.adjustDownButton.text = local.format("AdjustDownButtonText", new object[] { ControlsSettings.tool_0 }); EditorTerrainHeightUI.adjustDownButton.tooltip = local.format("AdjustDownButtonTooltip"); SleekButton sleekButton2 = EditorTerrainHeightUI.adjustDownButton; if (EditorTerrainHeightUI.< > f__mg$cache1 == null) { EditorTerrainHeightUI.< > f__mg$cache1 = new ClickedButton(EditorTerrainHeightUI.onClickedAdjustDownButton); } sleekButton2.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache1; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.adjustDownButton); EditorTerrainHeightUI.smoothButton = new SleekButtonIcon((Texture2D)bundle.load("Smooth")); EditorTerrainHeightUI.smoothButton.positionOffset_Y = -110; EditorTerrainHeightUI.smoothButton.positionScale_Y = 1f; EditorTerrainHeightUI.smoothButton.sizeOffset_X = 200; EditorTerrainHeightUI.smoothButton.sizeOffset_Y = 30; EditorTerrainHeightUI.smoothButton.text = local.format("SmoothButtonText", new object[] { ControlsSettings.tool_1 }); EditorTerrainHeightUI.smoothButton.tooltip = local.format("SmoothButtonTooltip"); SleekButton sleekButton3 = EditorTerrainHeightUI.smoothButton; if (EditorTerrainHeightUI.< > f__mg$cache2 == null) { EditorTerrainHeightUI.< > f__mg$cache2 = new ClickedButton(EditorTerrainHeightUI.onClickedSmoothButton); } sleekButton3.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache2; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.smoothButton); EditorTerrainHeightUI.flattenButton = new SleekButtonIcon((Texture2D)bundle.load("Flatten")); EditorTerrainHeightUI.flattenButton.positionOffset_Y = -70; EditorTerrainHeightUI.flattenButton.positionScale_Y = 1f; EditorTerrainHeightUI.flattenButton.sizeOffset_X = 200; EditorTerrainHeightUI.flattenButton.sizeOffset_Y = 30; EditorTerrainHeightUI.flattenButton.text = local.format("FlattenButtonText", new object[] { ControlsSettings.tool_2 }); EditorTerrainHeightUI.flattenButton.tooltip = local.format("FlattenButtonTooltip"); SleekButton sleekButton4 = EditorTerrainHeightUI.flattenButton; if (EditorTerrainHeightUI.< > f__mg$cache3 == null) { EditorTerrainHeightUI.< > f__mg$cache3 = new ClickedButton(EditorTerrainHeightUI.onClickedFlattenButton); } sleekButton4.onClickedButton = EditorTerrainHeightUI.< > f__mg$cache3; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.flattenButton); EditorTerrainHeightUI.map2Button = new SleekButtonState(new GUIContent[] { new GUIContent(local.format("Map2ButtonText1")), new GUIContent(local.format("Map2ButtonText2")) }); EditorTerrainHeightUI.map2Button.positionOffset_Y = -30; EditorTerrainHeightUI.map2Button.positionScale_Y = 1f; EditorTerrainHeightUI.map2Button.sizeOffset_X = 200; EditorTerrainHeightUI.map2Button.sizeOffset_Y = 30; EditorTerrainHeightUI.map2Button.tooltip = local.format("Map2ButtonTooltip"); SleekButtonState sleekButtonState = EditorTerrainHeightUI.map2Button; if (EditorTerrainHeightUI.< > f__mg$cache4 == null) { EditorTerrainHeightUI.< > f__mg$cache4 = new SwappedState(EditorTerrainHeightUI.onSwappedMap2); } sleekButtonState.onSwappedState = EditorTerrainHeightUI.< > f__mg$cache4; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.map2Button); EditorTerrainHeightUI.noiseSlider = new SleekSlider(); EditorTerrainHeightUI.noiseSlider.positionOffset_Y = -320; EditorTerrainHeightUI.noiseSlider.positionScale_Y = 1f; EditorTerrainHeightUI.noiseSlider.sizeOffset_X = 200; EditorTerrainHeightUI.noiseSlider.sizeOffset_Y = 20; EditorTerrainHeightUI.noiseSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainHeightUI.noiseSlider.state = EditorTerrainHeight.brushNoise; EditorTerrainHeightUI.noiseSlider.addLabel(local.format("NoiseSliderLabelText"), ESleekSide.RIGHT); SleekSlider sleekSlider = EditorTerrainHeightUI.noiseSlider; if (EditorTerrainHeightUI.< > f__mg$cache5 == null) { EditorTerrainHeightUI.< > f__mg$cache5 = new Dragged(EditorTerrainHeightUI.onDraggedNoiseSlider); } sleekSlider.onDragged = EditorTerrainHeightUI.< > f__mg$cache5; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.noiseSlider); EditorTerrainHeightUI.sizeSlider = new SleekSlider(); EditorTerrainHeightUI.sizeSlider.positionOffset_Y = -290; EditorTerrainHeightUI.sizeSlider.positionScale_Y = 1f; EditorTerrainHeightUI.sizeSlider.sizeOffset_X = 200; EditorTerrainHeightUI.sizeSlider.sizeOffset_Y = 20; EditorTerrainHeightUI.sizeSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainHeightUI.sizeSlider.state = (float)(EditorTerrainHeight.brushSize - EditorTerrainHeight.MIN_BRUSH_SIZE) / (float)EditorTerrainHeight.MAX_BRUSH_SIZE; EditorTerrainHeightUI.sizeSlider.addLabel(local.format("SizeSliderLabelText"), ESleekSide.RIGHT); SleekSlider sleekSlider2 = EditorTerrainHeightUI.sizeSlider; if (EditorTerrainHeightUI.< > f__mg$cache6 == null) { EditorTerrainHeightUI.< > f__mg$cache6 = new Dragged(EditorTerrainHeightUI.onDraggedSizeSlider); } sleekSlider2.onDragged = EditorTerrainHeightUI.< > f__mg$cache6; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.sizeSlider); EditorTerrainHeightUI.strengthSlider = new SleekSlider(); EditorTerrainHeightUI.strengthSlider.positionOffset_Y = -260; EditorTerrainHeightUI.strengthSlider.positionScale_Y = 1f; EditorTerrainHeightUI.strengthSlider.sizeOffset_X = 200; EditorTerrainHeightUI.strengthSlider.sizeOffset_Y = 20; EditorTerrainHeightUI.strengthSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainHeightUI.strengthSlider.addLabel(local.format("StrengthSliderLabelText"), ESleekSide.RIGHT); EditorTerrainHeightUI.strengthSlider.state = EditorTerrainHeight.brushStrength; SleekSlider sleekSlider3 = EditorTerrainHeightUI.strengthSlider; if (EditorTerrainHeightUI.< > f__mg$cache7 == null) { EditorTerrainHeightUI.< > f__mg$cache7 = new Dragged(EditorTerrainHeightUI.onDraggedStrengthSlider); } sleekSlider3.onDragged = EditorTerrainHeightUI.< > f__mg$cache7; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.strengthSlider); EditorTerrainHeightUI.heightValue = new SleekValue(); EditorTerrainHeightUI.heightValue.positionOffset_Y = -230; EditorTerrainHeightUI.heightValue.positionScale_Y = 1f; EditorTerrainHeightUI.heightValue.sizeOffset_X = 200; EditorTerrainHeightUI.heightValue.sizeOffset_Y = 30; EditorTerrainHeightUI.heightValue.addLabel(local.format("HeightValueLabelText"), ESleekSide.RIGHT); EditorTerrainHeightUI.heightValue.state = EditorTerrainHeight.brushHeight; SleekValue sleekValue = EditorTerrainHeightUI.heightValue; if (EditorTerrainHeightUI.< > f__mg$cache8 == null) { EditorTerrainHeightUI.< > f__mg$cache8 = new Valued(EditorTerrainHeightUI.onValuedHeightValue); } sleekValue.onValued = EditorTerrainHeightUI.< > f__mg$cache8; EditorTerrainHeightUI.container.add(EditorTerrainHeightUI.heightValue); bundle.unload(); }
private static void onValuedHeightValue(SleekValue value, float state) { EditorTerrainHeight.brushHeight = state; }
public EditorTerrainMaterialsUI() { Local local = Localization.read("/Editor/EditorTerrainMaterials.dat"); Bundle bundle = Bundles.getBundle("/Bundles/Textures/Edit/Icons/EditorTerrainMaterials/EditorTerrainMaterials.unity3d"); EditorTerrainMaterialsUI.container = new Sleek(); EditorTerrainMaterialsUI.container.positionOffset_X = 10; EditorTerrainMaterialsUI.container.positionOffset_Y = 10; EditorTerrainMaterialsUI.container.positionScale_X = 1f; EditorTerrainMaterialsUI.container.sizeOffset_X = -20; EditorTerrainMaterialsUI.container.sizeOffset_Y = -20; EditorTerrainMaterialsUI.container.sizeScale_X = 1f; EditorTerrainMaterialsUI.container.sizeScale_Y = 1f; EditorUI.window.add(EditorTerrainMaterialsUI.container); EditorTerrainMaterialsUI.active = false; EditorTerrainMaterialsUI.wasOpened = false; if (LevelGround.materials == null) { return; } EditorTerrainMaterialsUI.materialScrollBox = new SleekScrollBox(); EditorTerrainMaterialsUI.materialScrollBox.positionOffset_Y = 120; EditorTerrainMaterialsUI.materialScrollBox.positionOffset_X = -400; EditorTerrainMaterialsUI.materialScrollBox.positionScale_X = 1f; EditorTerrainMaterialsUI.materialScrollBox.sizeOffset_X = 400; EditorTerrainMaterialsUI.materialScrollBox.sizeOffset_Y = -200; EditorTerrainMaterialsUI.materialScrollBox.sizeScale_Y = 1f; EditorTerrainMaterialsUI.materialScrollBox.area = new Rect(0f, 0f, 5f, (float)(LevelGround.materials.Length * 70 + 750)); EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.materialScrollBox); for (int i = 0; i < LevelGround.materials.Length; i++) { SleekImageTexture sleekImageTexture = new SleekImageTexture(); sleekImageTexture.positionOffset_X = 200; sleekImageTexture.positionOffset_Y = i * 70; sleekImageTexture.sizeOffset_X = 64; sleekImageTexture.sizeOffset_Y = 64; sleekImageTexture.texture = LevelGround.materials[i].prototype.texture; EditorTerrainMaterialsUI.materialScrollBox.add(sleekImageTexture); SleekButton sleekButton = new SleekButton(); sleekButton.positionOffset_X = 70; sleekButton.sizeOffset_X = 100; sleekButton.sizeOffset_Y = 64; sleekButton.text = i + " " + LevelGround.materials[i].prototype.texture.name; SleekButton sleekButton2 = sleekButton; if (EditorTerrainMaterialsUI.< > f__mg$cache0 == null) { EditorTerrainMaterialsUI.< > f__mg$cache0 = new ClickedButton(EditorTerrainMaterialsUI.onClickedMaterialButton); } sleekButton2.onClickedButton = EditorTerrainMaterialsUI.< > f__mg$cache0; sleekImageTexture.add(sleekButton); } EditorTerrainMaterialsUI.overgrowthSlider = new SleekSlider(); EditorTerrainMaterialsUI.overgrowthSlider.positionOffset_X = 200; EditorTerrainMaterialsUI.overgrowthSlider.positionOffset_Y = LevelGround.materials.Length * 70; EditorTerrainMaterialsUI.overgrowthSlider.sizeOffset_X = 170; EditorTerrainMaterialsUI.overgrowthSlider.sizeOffset_Y = 20; EditorTerrainMaterialsUI.overgrowthSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainMaterialsUI.overgrowthSlider.addLabel(local.format("OvergrowthSliderLabelText"), ESleekSide.LEFT); SleekSlider sleekSlider = EditorTerrainMaterialsUI.overgrowthSlider; if (EditorTerrainMaterialsUI.< > f__mg$cache1 == null) { EditorTerrainMaterialsUI.< > f__mg$cache1 = new Dragged(EditorTerrainMaterialsUI.onDraggedOvergrowthSlider); } sleekSlider.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache1; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.overgrowthSlider); EditorTerrainMaterialsUI.chanceSlider = new SleekSlider(); EditorTerrainMaterialsUI.chanceSlider.positionOffset_X = 200; EditorTerrainMaterialsUI.chanceSlider.positionOffset_Y = LevelGround.materials.Length * 70 + 30; EditorTerrainMaterialsUI.chanceSlider.sizeOffset_X = 170; EditorTerrainMaterialsUI.chanceSlider.sizeOffset_Y = 20; EditorTerrainMaterialsUI.chanceSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainMaterialsUI.chanceSlider.addLabel(local.format("ChanceSliderLabelText"), ESleekSide.LEFT); SleekSlider sleekSlider2 = EditorTerrainMaterialsUI.chanceSlider; if (EditorTerrainMaterialsUI.< > f__mg$cache2 == null) { EditorTerrainMaterialsUI.< > f__mg$cache2 = new Dragged(EditorTerrainMaterialsUI.onDraggedChanceSlider); } sleekSlider2.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache2; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.chanceSlider); EditorTerrainMaterialsUI.steepnessSlider = new SleekSlider(); EditorTerrainMaterialsUI.steepnessSlider.positionOffset_X = 200; EditorTerrainMaterialsUI.steepnessSlider.positionOffset_Y = LevelGround.materials.Length * 70 + 60; EditorTerrainMaterialsUI.steepnessSlider.sizeOffset_X = 170; EditorTerrainMaterialsUI.steepnessSlider.sizeOffset_Y = 20; EditorTerrainMaterialsUI.steepnessSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainMaterialsUI.steepnessSlider.addLabel(local.format("SteepnessFieldLabelText"), ESleekSide.LEFT); SleekSlider sleekSlider3 = EditorTerrainMaterialsUI.steepnessSlider; if (EditorTerrainMaterialsUI.< > f__mg$cache3 == null) { EditorTerrainMaterialsUI.< > f__mg$cache3 = new Dragged(EditorTerrainMaterialsUI.onDraggedSteepnessSlider); } sleekSlider3.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache3; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.steepnessSlider); EditorTerrainMaterialsUI.transitionSlider = new SleekSlider(); EditorTerrainMaterialsUI.transitionSlider.positionOffset_X = 200; EditorTerrainMaterialsUI.transitionSlider.positionOffset_Y = LevelGround.materials.Length * 70 + 90; EditorTerrainMaterialsUI.transitionSlider.sizeOffset_X = 170; EditorTerrainMaterialsUI.transitionSlider.sizeOffset_Y = 20; EditorTerrainMaterialsUI.transitionSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainMaterialsUI.transitionSlider.addLabel(local.format("TransitionSliderLabelText"), ESleekSide.LEFT); SleekSlider sleekSlider4 = EditorTerrainMaterialsUI.transitionSlider; if (EditorTerrainMaterialsUI.< > f__mg$cache4 == null) { EditorTerrainMaterialsUI.< > f__mg$cache4 = new Dragged(EditorTerrainMaterialsUI.onDraggedTransitionSlider); } sleekSlider4.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache4; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.transitionSlider); EditorTerrainMaterialsUI.heightValue = new SleekValue(); EditorTerrainMaterialsUI.heightValue.positionOffset_X = 200; EditorTerrainMaterialsUI.heightValue.positionOffset_Y = LevelGround.materials.Length * 70 + 120; EditorTerrainMaterialsUI.heightValue.sizeOffset_X = 170; EditorTerrainMaterialsUI.heightValue.sizeOffset_Y = 30; EditorTerrainMaterialsUI.heightValue.addLabel(local.format("HeightValueLabelText"), ESleekSide.LEFT); SleekValue sleekValue = EditorTerrainMaterialsUI.heightValue; if (EditorTerrainMaterialsUI.< > f__mg$cache5 == null) { EditorTerrainMaterialsUI.< > f__mg$cache5 = new Valued(EditorTerrainMaterialsUI.onValuedHeightValue); } sleekValue.onValued = EditorTerrainMaterialsUI.< > f__mg$cache5; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.heightValue); EditorTerrainMaterialsUI.grassy_0_Toggle = new SleekToggle(); EditorTerrainMaterialsUI.grassy_0_Toggle.positionOffset_X = 200; EditorTerrainMaterialsUI.grassy_0_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 160; EditorTerrainMaterialsUI.grassy_0_Toggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.grassy_0_Toggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.grassy_0_Toggle.addLabel(local.format("Grassy_0_ToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle = EditorTerrainMaterialsUI.grassy_0_Toggle; if (EditorTerrainMaterialsUI.< > f__mg$cache6 == null) { EditorTerrainMaterialsUI.< > f__mg$cache6 = new Toggled(EditorTerrainMaterialsUI.onToggledGrassy_0_Toggle); } sleekToggle.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache6; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.grassy_0_Toggle); EditorTerrainMaterialsUI.grassy_1_Toggle = new SleekToggle(); EditorTerrainMaterialsUI.grassy_1_Toggle.positionOffset_X = 200; EditorTerrainMaterialsUI.grassy_1_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 210; EditorTerrainMaterialsUI.grassy_1_Toggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.grassy_1_Toggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.grassy_1_Toggle.addLabel(local.format("Grassy_1_ToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle2 = EditorTerrainMaterialsUI.grassy_1_Toggle; if (EditorTerrainMaterialsUI.< > f__mg$cache7 == null) { EditorTerrainMaterialsUI.< > f__mg$cache7 = new Toggled(EditorTerrainMaterialsUI.onToggledGrassy_1_Toggle); } sleekToggle2.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache7; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.grassy_1_Toggle); EditorTerrainMaterialsUI.flowery_0_Toggle = new SleekToggle(); EditorTerrainMaterialsUI.flowery_0_Toggle.positionOffset_X = 200; EditorTerrainMaterialsUI.flowery_0_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 260; EditorTerrainMaterialsUI.flowery_0_Toggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.flowery_0_Toggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.flowery_0_Toggle.addLabel(local.format("Flowery_0_ToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle3 = EditorTerrainMaterialsUI.flowery_0_Toggle; if (EditorTerrainMaterialsUI.< > f__mg$cache8 == null) { EditorTerrainMaterialsUI.< > f__mg$cache8 = new Toggled(EditorTerrainMaterialsUI.onToggledFlowery_0_Toggle); } sleekToggle3.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache8; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.flowery_0_Toggle); EditorTerrainMaterialsUI.flowery_1_Toggle = new SleekToggle(); EditorTerrainMaterialsUI.flowery_1_Toggle.positionOffset_X = 200; EditorTerrainMaterialsUI.flowery_1_Toggle.positionOffset_Y = LevelGround.materials.Length * 70 + 310; EditorTerrainMaterialsUI.flowery_1_Toggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.flowery_1_Toggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.flowery_1_Toggle.addLabel(local.format("Flowery_1_ToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle4 = EditorTerrainMaterialsUI.flowery_1_Toggle; if (EditorTerrainMaterialsUI.< > f__mg$cache9 == null) { EditorTerrainMaterialsUI.< > f__mg$cache9 = new Toggled(EditorTerrainMaterialsUI.onToggledFlowery_1_Toggle); } sleekToggle4.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache9; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.flowery_1_Toggle); EditorTerrainMaterialsUI.rockyToggle = new SleekToggle(); EditorTerrainMaterialsUI.rockyToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.rockyToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 360; EditorTerrainMaterialsUI.rockyToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.rockyToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.rockyToggle.addLabel(local.format("RockyToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle5 = EditorTerrainMaterialsUI.rockyToggle; if (EditorTerrainMaterialsUI.< > f__mg$cacheA == null) { EditorTerrainMaterialsUI.< > f__mg$cacheA = new Toggled(EditorTerrainMaterialsUI.onToggledRockyToggle); } sleekToggle5.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheA; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.rockyToggle); EditorTerrainMaterialsUI.roadToggle = new SleekToggle(); EditorTerrainMaterialsUI.roadToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.roadToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 410; EditorTerrainMaterialsUI.roadToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.roadToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.roadToggle.addLabel(local.format("RoadToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle6 = EditorTerrainMaterialsUI.roadToggle; if (EditorTerrainMaterialsUI.< > f__mg$cacheB == null) { EditorTerrainMaterialsUI.< > f__mg$cacheB = new Toggled(EditorTerrainMaterialsUI.onToggledRoadToggle); } sleekToggle6.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheB; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.roadToggle); EditorTerrainMaterialsUI.snowyToggle = new SleekToggle(); EditorTerrainMaterialsUI.snowyToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.snowyToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 460; EditorTerrainMaterialsUI.snowyToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.snowyToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.snowyToggle.addLabel(local.format("SnowyToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle7 = EditorTerrainMaterialsUI.snowyToggle; if (EditorTerrainMaterialsUI.< > f__mg$cacheC == null) { EditorTerrainMaterialsUI.< > f__mg$cacheC = new Toggled(EditorTerrainMaterialsUI.onToggledSnowyToggle); } sleekToggle7.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheC; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.snowyToggle); EditorTerrainMaterialsUI.foundationToggle = new SleekToggle(); EditorTerrainMaterialsUI.foundationToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.foundationToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 510; EditorTerrainMaterialsUI.foundationToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.foundationToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.foundationToggle.addLabel(local.format("FoundationToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle8 = EditorTerrainMaterialsUI.foundationToggle; if (EditorTerrainMaterialsUI.< > f__mg$cacheD == null) { EditorTerrainMaterialsUI.< > f__mg$cacheD = new Toggled(EditorTerrainMaterialsUI.onToggledFoundationToggle); } sleekToggle8.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheD; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.foundationToggle); EditorTerrainMaterialsUI.manualToggle = new SleekToggle(); EditorTerrainMaterialsUI.manualToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.manualToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 560; EditorTerrainMaterialsUI.manualToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.manualToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.manualToggle.addLabel(local.format("ManualToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle9 = EditorTerrainMaterialsUI.manualToggle; if (EditorTerrainMaterialsUI.< > f__mg$cacheE == null) { EditorTerrainMaterialsUI.< > f__mg$cacheE = new Toggled(EditorTerrainMaterialsUI.onToggledManualToggle); } sleekToggle9.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheE; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.manualToggle); EditorTerrainMaterialsUI.steepnessToggle = new SleekToggle(); EditorTerrainMaterialsUI.steepnessToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.steepnessToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 610; EditorTerrainMaterialsUI.steepnessToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.steepnessToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.steepnessToggle.addLabel(local.format("SteepnessToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle10 = EditorTerrainMaterialsUI.steepnessToggle; if (EditorTerrainMaterialsUI.< > f__mg$cacheF == null) { EditorTerrainMaterialsUI.< > f__mg$cacheF = new Toggled(EditorTerrainMaterialsUI.onToggledSteepnessToggle); } sleekToggle10.onToggled = EditorTerrainMaterialsUI.< > f__mg$cacheF; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.steepnessToggle); EditorTerrainMaterialsUI.heightToggle = new SleekToggle(); EditorTerrainMaterialsUI.heightToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.heightToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 660; EditorTerrainMaterialsUI.heightToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.heightToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.heightToggle.addLabel(local.format("HeightToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle11 = EditorTerrainMaterialsUI.heightToggle; if (EditorTerrainMaterialsUI.< > f__mg$cache10 == null) { EditorTerrainMaterialsUI.< > f__mg$cache10 = new Toggled(EditorTerrainMaterialsUI.onToggledHeightToggle); } sleekToggle11.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache10; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.heightToggle); EditorTerrainMaterialsUI.footprintToggle = new SleekToggle(); EditorTerrainMaterialsUI.footprintToggle.positionOffset_X = 200; EditorTerrainMaterialsUI.footprintToggle.positionOffset_Y = LevelGround.materials.Length * 70 + 710; EditorTerrainMaterialsUI.footprintToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.footprintToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.footprintToggle.addLabel(local.format("FootprintToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle12 = EditorTerrainMaterialsUI.footprintToggle; if (EditorTerrainMaterialsUI.< > f__mg$cache11 == null) { EditorTerrainMaterialsUI.< > f__mg$cache11 = new Toggled(EditorTerrainMaterialsUI.onToggledFootprintToggle); } sleekToggle12.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache11; EditorTerrainMaterialsUI.materialScrollBox.add(EditorTerrainMaterialsUI.footprintToggle); EditorTerrainMaterialsUI.selectedBox = new SleekBox(); EditorTerrainMaterialsUI.selectedBox.positionOffset_X = -200; EditorTerrainMaterialsUI.selectedBox.positionOffset_Y = 80; EditorTerrainMaterialsUI.selectedBox.positionScale_X = 1f; EditorTerrainMaterialsUI.selectedBox.sizeOffset_X = 200; EditorTerrainMaterialsUI.selectedBox.sizeOffset_Y = 30; EditorTerrainMaterialsUI.selectedBox.addLabel(local.format("SelectionBoxLabelText"), ESleekSide.LEFT); EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.selectedBox); EditorTerrainMaterialsUI.updateSelection(); EditorTerrainMaterialsUI.bakeGlobalMaterialsButton = new SleekButtonIcon((Texture2D)bundle.load("Materials")); EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionOffset_X = -200; EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionOffset_Y = -70; EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionScale_X = 1f; EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.positionScale_Y = 1f; EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.sizeOffset_X = 200; EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.sizeOffset_Y = 30; EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.text = local.format("BakeGlobalMaterialsButtonText"); EditorTerrainMaterialsUI.bakeGlobalMaterialsButton.tooltip = local.format("BakeGlobalMaterialsButtonTooltip"); SleekButton sleekButton3 = EditorTerrainMaterialsUI.bakeGlobalMaterialsButton; if (EditorTerrainMaterialsUI.< > f__mg$cache12 == null) { EditorTerrainMaterialsUI.< > f__mg$cache12 = new ClickedButton(EditorTerrainMaterialsUI.onClickedBakeGlobalMaterialsButton); } sleekButton3.onClickedButton = EditorTerrainMaterialsUI.< > f__mg$cache12; EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.bakeGlobalMaterialsButton); EditorTerrainMaterialsUI.bakeLocalMaterialsButton = new SleekButtonIcon((Texture2D)bundle.load("Materials")); EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionOffset_X = -200; EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionOffset_Y = -30; EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionScale_X = 1f; EditorTerrainMaterialsUI.bakeLocalMaterialsButton.positionScale_Y = 1f; EditorTerrainMaterialsUI.bakeLocalMaterialsButton.sizeOffset_X = 200; EditorTerrainMaterialsUI.bakeLocalMaterialsButton.sizeOffset_Y = 30; EditorTerrainMaterialsUI.bakeLocalMaterialsButton.text = local.format("BakeLocalMaterialsButtonText"); EditorTerrainMaterialsUI.bakeLocalMaterialsButton.tooltip = local.format("BakeLocalMaterialsButtonTooltip"); SleekButton sleekButton4 = EditorTerrainMaterialsUI.bakeLocalMaterialsButton; if (EditorTerrainMaterialsUI.< > f__mg$cache13 == null) { EditorTerrainMaterialsUI.< > f__mg$cache13 = new ClickedButton(EditorTerrainMaterialsUI.onClickedBakeLocalMaterialsButton); } sleekButton4.onClickedButton = EditorTerrainMaterialsUI.< > f__mg$cache13; EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.bakeLocalMaterialsButton); EditorTerrainMaterialsUI.map2Button = new SleekButtonState(new GUIContent[] { new GUIContent(local.format("Map2ButtonText1")), new GUIContent(local.format("Map2ButtonText2")) }); EditorTerrainMaterialsUI.map2Button.positionOffset_Y = -30; EditorTerrainMaterialsUI.map2Button.positionScale_Y = 1f; EditorTerrainMaterialsUI.map2Button.sizeOffset_X = 200; EditorTerrainMaterialsUI.map2Button.sizeOffset_Y = 30; EditorTerrainMaterialsUI.map2Button.tooltip = local.format("Map2ButtonTooltip"); SleekButtonState sleekButtonState = EditorTerrainMaterialsUI.map2Button; if (EditorTerrainMaterialsUI.< > f__mg$cache14 == null) { EditorTerrainMaterialsUI.< > f__mg$cache14 = new SwappedState(EditorTerrainMaterialsUI.onSwappedMap2); } sleekButtonState.onSwappedState = EditorTerrainMaterialsUI.< > f__mg$cache14; EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.map2Button); EditorTerrainMaterialsUI.sizeSlider = new SleekSlider(); EditorTerrainMaterialsUI.sizeSlider.positionOffset_Y = -60; EditorTerrainMaterialsUI.sizeSlider.positionScale_Y = 1f; EditorTerrainMaterialsUI.sizeSlider.sizeOffset_X = 200; EditorTerrainMaterialsUI.sizeSlider.sizeOffset_Y = 20; EditorTerrainMaterialsUI.sizeSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainMaterialsUI.sizeSlider.state = (float)(EditorTerrainMaterials.brushSize - EditorTerrainMaterials.MIN_BRUSH_SIZE) / (float)EditorTerrainMaterials.MAX_BRUSH_SIZE; EditorTerrainMaterialsUI.sizeSlider.addLabel(local.format("SizeSliderLabelText"), ESleekSide.RIGHT); SleekSlider sleekSlider5 = EditorTerrainMaterialsUI.sizeSlider; if (EditorTerrainMaterialsUI.< > f__mg$cache15 == null) { EditorTerrainMaterialsUI.< > f__mg$cache15 = new Dragged(EditorTerrainMaterialsUI.onDraggedSizeSlider); } sleekSlider5.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache15; EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.sizeSlider); EditorTerrainMaterialsUI.noiseSlider = new SleekSlider(); EditorTerrainMaterialsUI.noiseSlider.positionOffset_Y = -90; EditorTerrainMaterialsUI.noiseSlider.positionScale_Y = 1f; EditorTerrainMaterialsUI.noiseSlider.sizeOffset_X = 200; EditorTerrainMaterialsUI.noiseSlider.sizeOffset_Y = 20; EditorTerrainMaterialsUI.noiseSlider.orientation = ESleekOrientation.HORIZONTAL; EditorTerrainMaterialsUI.noiseSlider.state = EditorTerrainMaterials.brushNoise; EditorTerrainMaterialsUI.noiseSlider.addLabel(local.format("NoiseSliderLabelText"), ESleekSide.RIGHT); SleekSlider sleekSlider6 = EditorTerrainMaterialsUI.noiseSlider; if (EditorTerrainMaterialsUI.< > f__mg$cache16 == null) { EditorTerrainMaterialsUI.< > f__mg$cache16 = new Dragged(EditorTerrainMaterialsUI.onDraggedNoiseSlider); } sleekSlider6.onDragged = EditorTerrainMaterialsUI.< > f__mg$cache16; EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.noiseSlider); EditorTerrainMaterialsUI.previewToggle = new SleekToggle(); EditorTerrainMaterialsUI.previewToggle.positionOffset_Y = -140; EditorTerrainMaterialsUI.previewToggle.positionScale_Y = 1f; EditorTerrainMaterialsUI.previewToggle.sizeOffset_X = 40; EditorTerrainMaterialsUI.previewToggle.sizeOffset_Y = 40; EditorTerrainMaterialsUI.previewToggle.addLabel(local.format("PreviewToggleLabelText"), ESleekSide.RIGHT); SleekToggle sleekToggle13 = EditorTerrainMaterialsUI.previewToggle; if (EditorTerrainMaterialsUI.< > f__mg$cache17 == null) { EditorTerrainMaterialsUI.< > f__mg$cache17 = new Toggled(EditorTerrainMaterialsUI.onToggledPreviewToggle); } sleekToggle13.onToggled = EditorTerrainMaterialsUI.< > f__mg$cache17; EditorTerrainMaterialsUI.container.add(EditorTerrainMaterialsUI.previewToggle); bundle.unload(); }
private static void onValuedHeightValue(SleekValue value, float state) { LevelGround.materials[(int)EditorTerrainMaterials.selected].height = state; }
// Token: 0x060034A6 RID: 13478 RVA: 0x0015AAB8 File Offset: 0x00158EB8 private static void onValuedSnowLevelSlider(SleekValue slider, float state) { LevelLighting.snowLevel = state; }
// 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(); }