override public void SetupPane()
        {
            if (GlobalFogDef.globalFogEffect == null)
            {
                GlobalFogDef.Setup();
            }

            this.fogModeBox               = new CustomComboBox(FOG_MODES);
            this.fogModeBox.Text          = Translation.GetText("GlobalFog", "fogMode");
            this.fogModeBox.SelectedIndex = (int)GlobalFogDef.globalFogEffect.fogMode;
            this.ChildControls.Add(this.fogModeBox);

            this.globalDensitySlider      = new CustomSlider(GlobalFogDef.globalFogEffect.globalDensity, 0f, 5f, 4);
            this.globalDensitySlider.Text = Translation.GetText("GlobalFog", "globalDensity");
            this.ChildControls.Add(this.globalDensitySlider);

            this.heightSlider      = new CustomSlider(GlobalFogDef.globalFogEffect.height, 0f, 50f, 2);
            this.heightSlider.Text = Translation.GetText("GlobalFog", "height");
            this.ChildControls.Add(this.heightSlider);

            this.heightScaleSlider      = new CustomSlider(GlobalFogDef.globalFogEffect.heightScale, 1f, 10f, 2);
            this.heightScaleSlider.Text = Translation.GetText("GlobalFog", "heightScale");
            this.ChildControls.Add(this.heightScaleSlider);

            this.startDistanceSlider      = new CustomSlider(GlobalFogDef.globalFogEffect.startDistance, 0f, 50f, 2);
            this.startDistanceSlider.Text = Translation.GetText("GlobalFog", "startDistance");
            this.ChildControls.Add(this.startDistanceSlider);

            this.globalFogColorPicker        = new CustomColorPicker(GlobalFogDef.globalFogEffect.globalFogColor);
            this.globalFogColorPicker.Text   = Translation.GetText("GlobalFog", "globalFogColor");
            this.globalFogColorPicker.IsRGBA = false;
            this.ChildControls.Add(this.globalFogColorPicker);

            this.adjustHeightScaleToggle      = new CustomToggleButton(GlobalFogDef.AdjustHeightScale, "button");
            this.adjustHeightScaleToggle.Text = Translation.GetText("GlobalFog", "adjustHeightScale");
            this.ChildControls.Add(this.adjustHeightScaleToggle);

            this.adjustStartDistanceToggle      = new CustomToggleButton(GlobalFogDef.AdjustStartDistance, "button");
            this.adjustStartDistanceToggle.Text = Translation.GetText("GlobalFog", "adjustStartDistance");
            this.ChildControls.Add(this.adjustStartDistanceToggle);

            setup = true;
        }
Ejemplo n.º 2
0
        override public void Update()
        {
            try
            {
                if (Instances.needEffectWindowReload)
                {
                    this.ChildControls.Clear();
                    this.Awake();
                }

                ColorCorrectionCurvesDef.Update(this.colorCorrectionCurvesPane);
                SepiaDef.Update(this.sepiaPane);
                GrayscaleDef.Update(this.grayscalePane);
                ContrastDef.Update(this.contrastPane);
                EdgeDetectDef.Update(this.edgeDetectPane);
                // SSAODef.Update(this.ssaoPane);
                CreaseDef.Update(this.creasePane);
                AntialiasingDef.Update(this.antialiasingPane);
                NoiseAndGrainDef.Update(this.noiseAndGrainPane);
                BlurDef.Update(this.blurPane);
                DepthOfFieldDef.Update(this.depthOfFieldPane);
                MotionBlurDef.Update(this.motionBlurPane);
                BloomDef.Update(this.bloomPane);
                GlobalFogDef.Update(this.globalFogPane);
                TiltShiftHdrDef.Update(this.tiltShiftHdrPane);
                FisheyeDef.Update(this.fisheyePane);
                VignettingDef.Update(this.vignettingPane);
                SunShaftsDef.Update(this.sunShaftsPane);
                LensDistortionBlurDef.Update(this.lensDistortionBlurPane);
                LetterboxDef.Update(this.letterboxPane);
                HueFocusDef.Update(this.hueFocusPane);
                ChannelSwapDef.Update(this.channelSwapPane);
                TechnicolorDef.Update(this.technicolorPane);
                DynamicLookupDef.Update(this.dynamicLookupPane);
                AnalogGlitchDef.Update(this.analogGlitchPane);
                DigitalGlitchDef.Update(this.digitalGlitchPane);
                BokehDef.Update(this.bokehPane);
                ObscuranceDef.Update(this.obscurancePane);
                AnalogTVDef.Update(this.analogTVPane);
                BleachBypassDef.Update(this.bleachBypassPane);
                BlendDef.Update(this.blendPane);
                BrightnessContrastGammaDef.Update(this.brightnessContrastGammaPane);
                ChannelMixerDef.Update(this.channelMixerPane);
                ComicBookDef.Update(this.comicBookPane);
                ContrastVignetteDef.Update(this.contrastVignettePane);
                Convolution3x3Def.Update(this.convolution3x3Pane);
                DoubleVisionDef.Update(this.doubleVisionPane);
                HalftoneDef.Update(this.halftonePane);
                IsolineDef.Update(this.isolinePane);
                KuwaharaDef.Update(this.kuwaharaPane);
                LookupFilterDef.Update(this.lookupFilterPane);
                PixelateDef.Update(this.pixelatePane);
                RGBSplitDef.Update(this.rgbSplitPane);
                ShadowsMidtonesHighlightsDef.Update(this.shadowsMidtonesHighlightsPane);
                WaveDistortionDef.Update(this.waveDistortionPane);
                WhiteBalanceDef.Update(this.whiteBalancePane);
                WiggleDef.Update(this.wigglePane);

                if (Instances.needEffectWindowReload)
                {
                    Instances.needEffectWindowReload = false;
                }
            }

            catch (Exception e)
            {
                Debug.LogError(e.ToString());
            }
        }