Ejemplo n.º 1
0
        public override void Init()
        {
            HSystem       hdata = Manager.Config.HData;
            GraphicSystem gdata = Manager.Config.GraphicData;

            this.LinkToggleArray(this.drawToggles, (Action <int>)(i => hdata.Visible          = i == 0));
            this.LinkToggleArray(this.sonToggles, (Action <int>)(i => hdata.Son               = i == 0));
            this.LinkToggleArray(this.clothToggles, (Action <int>)(i => hdata.Cloth           = i == 0));
            this.LinkToggleArray(this.accessoryToggles, (Action <int>)(i => hdata.Accessory   = i == 0));
            this.LinkToggleArray(this.shoesToggles, (Action <int>)(i => hdata.Shoes           = i == 0));
            this.LinkToggleArray(this.silhouetteToggles, (Action <int>)(i => gdata.SimpleBody = i == 0));
            this.silhouetteCololr.actUpdateColor = (Action <Color>)(c => gdata.SilhouetteColor = c);
            this.LinkToggleArray(this.siruToggles, (Action <int>)(i => hdata.Siru             = i));
            this.LinkToggleArray(this.urineToggles, (Action <int>)(i => hdata.Urine           = i == 0));
            this.LinkToggleArray(this.sioToggles, (Action <int>)(i => hdata.Sio               = i == 0));
            this.LinkToggleArray(this.glossToggles, (Action <int>)(i => hdata.Gloss           = i == 0));
            this.LinkToggleArray(this.gaugeToggles, (Action <int>)(i => hdata.FeelingGauge    = i == 0));
            this.LinkToggleArray(this.guideToggles, (Action <int>)(i => hdata.ActionGuide     = i == 0));
            this.LinkToggleArray(this.muneToggles, (Action <int>)(i => hdata.MenuIcon         = i == 0));
            this.LinkToggleArray(this.finishToggles, (Action <int>)(i => hdata.FinishButton   = i == 0));
            this.LinkToggleArray(this.initCameraToggles, (Action <int>)(i => hdata.InitCamera = i == 0));
            this.LinkToggleArray(this.eyeDir0Toggles, (Action <int>)(i => hdata.EyeDir0       = i == 0));
            this.LinkToggleArray(this.neckDir0Toggles, (Action <int>)(i => hdata.NeckDir0     = i == 0));
            this.LinkToggleArray(this.eyeDir1Toggles, (Action <int>)(i => hdata.EyeDir1       = i == 0));
            this.LinkToggleArray(this.neckDir1Toggles, (Action <int>)(i => hdata.NeckDir1     = i == 0));
        }
Ejemplo n.º 2
0
        protected override void ValueToUI()
        {
            HSystem       hdata = Manager.Config.HData;
            GraphicSystem gdata = Manager.Config.GraphicData;

            this.SetToggleUIArray(this.drawToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Visible : hdata.Visible)));
            this.SetToggleUIArray(this.sonToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Son : hdata.Son)));
            this.SetToggleUIArray(this.clothToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Cloth : hdata.Cloth)));
            this.SetToggleUIArray(this.accessoryToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Accessory : hdata.Accessory)));
            this.SetToggleUIArray(this.shoesToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Shoes : hdata.Shoes)));
            this.SetToggleUIArray(this.silhouetteToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !gdata.SimpleBody : gdata.SimpleBody)));
            this.silhouetteCololr.SetColor(gdata.SilhouetteColor);
            this.SetToggleUIArray(this.siruToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index == hdata.Siru)));
            this.SetToggleUIArray(this.urineToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Urine : hdata.Urine)));
            this.SetToggleUIArray(this.sioToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Sio : hdata.Sio)));
            this.SetToggleUIArray(this.glossToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.Gloss : hdata.Gloss)));
            this.SetToggleUIArray(this.gaugeToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.FeelingGauge : hdata.FeelingGauge)));
            this.SetToggleUIArray(this.guideToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.ActionGuide : hdata.ActionGuide)));
            this.SetToggleUIArray(this.muneToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.MenuIcon : hdata.MenuIcon)));
            this.SetToggleUIArray(this.finishToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.FinishButton : hdata.FinishButton)));
            this.SetToggleUIArray(this.initCameraToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.InitCamera : hdata.InitCamera)));
            this.SetToggleUIArray(this.eyeDir0Toggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.EyeDir0 : hdata.EyeDir0)));
            this.SetToggleUIArray(this.neckDir0Toggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.NeckDir0 : hdata.NeckDir0)));
            this.SetToggleUIArray(this.eyeDir1Toggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.EyeDir1 : hdata.EyeDir1)));
            this.SetToggleUIArray(this.neckDir1Toggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !hdata.NeckDir1 : hdata.NeckDir1)));
        }
Ejemplo n.º 3
0
        protected override void ValueToUI()
        {
            GraphicSystem data = Manager.Config.GraphicData;

            this.selfShadowToggle.set_isOn(data.SelfShadow);
            this.depthOfFieldToggle.set_isOn(data.DepthOfField);
            this.bloomToggle.set_isOn(data.Bloom);
            this.atmosphereToggle.set_isOn(data.Atmospheric);
            this.ssaoToggle.set_isOn(data.SSAO);
            this.vignetteToggle.set_isOn(data.Vignette);
            this.ssrToggle.set_isOn(data.SSR);
            this.rainToggle.set_isOn(data.Rain);
            this.SetEasySlider();
            this.SetToggleUIArray(this.charaLevalToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index == (int)data.CharaGraphicQuality)));
            this.SetToggleUIArray(this.mapLevalToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index == (int)data.MapGraphicQuality)));
            this.SetToggleUIArray(this.faceLightToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !data.FaceLight : data.FaceLight)));
            this.SetToggleUIArray(this.ambientToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !data.AmbientLight : data.AmbientLight)));
            this.SetToggleUIArray(this.shieldToggles, (Action <Toggle, int>)((tgl, index) => tgl.set_isOn(index != 0 ? !data.Shield : data.Shield)));
            this.backGroundCololr.SetColor(data.BackColor);
            this.charaMaxNumSlider.set_value((float)data.MaxCharaNum);
            this.Entry0Toggle.set_isOn(data.CharasEntry[0]);
            this.Entry1Toggle.set_isOn(data.CharasEntry[1]);
            this.Entry2Toggle.set_isOn(data.CharasEntry[2]);
            this.Entry3Toggle.set_isOn(data.CharasEntry[3]);
        }
Ejemplo n.º 4
0
        private void SetEasySlider()
        {
            GraphicSystem graphicData = Manager.Config.GraphicData;

            bool[] flagArray = new bool[8]
            {
                graphicData.SelfShadow,
                graphicData.DepthOfField,
                graphicData.Bloom,
                graphicData.Atmospheric,
                graphicData.SSAO,
                graphicData.Vignette,
                graphicData.SSR,
                graphicData.Rain
            };
            List <bool> boolList = new List <bool>();
            int         length   = flagArray.Length;

            foreach (KeyValuePair <int, List <bool> > keyValuePair in this.easySettingInfo)
            {
                int num = 0;
                for (int index = 0; index < length; ++index)
                {
                    if (keyValuePair.Value[index] && flagArray[index] == keyValuePair.Value[index])
                    {
                        ++num;
                    }
                }
                boolList.Add(num == keyValuePair.Value.Count <bool>((Func <bool, bool>)(b => b)));
            }
            int num1 = boolList.FindLastIndex((Predicate <bool>)(v => v)) + 1;

            if ((double)this.qualitySlider.get_value() == (double)num1)
            {
                return;
            }
            this.ChangeSlider = false;
            this.qualitySlider.set_value((float)num1);
        }
Ejemplo n.º 5
0
        private void Refresh()
        {
            GraphicSystem graphicData = Manager.Config.GraphicData;

            using (List <Bloom> .Enumerator enumerator = this._bloom.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Bloom current = enumerator.Current;
                    if (((PostProcessEffectSettings)current).active != (graphicData.Bloom ? 1 : 0))
                    {
                        ((PostProcessEffectSettings)current).active = (__Null)(graphicData.Bloom ? 1 : 0);
                    }
                }
            }
            using (List <AmbientOcclusion> .Enumerator enumerator = this._ao.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    AmbientOcclusion current = enumerator.Current;
                    if (((PostProcessEffectSettings)current).active != (graphicData.SSAO ? 1 : 0))
                    {
                        ((PostProcessEffectSettings)current).active = (__Null)(graphicData.SSAO ? 1 : 0);
                    }
                }
            }
            using (List <ScreenSpaceReflections> .Enumerator enumerator = this._ssr.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ScreenSpaceReflections current = enumerator.Current;
                    if (((PostProcessEffectSettings)current).active != (graphicData.SSR ? 1 : 0))
                    {
                        ((PostProcessEffectSettings)current).active = (__Null)(graphicData.SSR ? 1 : 0);
                    }
                }
            }
            using (List <DepthOfField> .Enumerator enumerator = this._dof.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    DepthOfField current = enumerator.Current;
                    if (((PostProcessEffectSettings)current).active != (graphicData.DepthOfField ? 1 : 0))
                    {
                        ((PostProcessEffectSettings)current).active = (__Null)(graphicData.DepthOfField ? 1 : 0);
                    }
                }
            }
            using (List <Vignette> .Enumerator enumerator = this._vignette.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Vignette current = enumerator.Current;
                    if (((PostProcessEffectSettings)current).active != (graphicData.Vignette ? 1 : 0))
                    {
                        ((PostProcessEffectSettings)current).active = (__Null)(graphicData.Vignette ? 1 : 0);
                    }
                }
            }
            if (Singleton <Manager.Map> .IsInstance() && Object.op_Inequality((Object)Singleton <Manager.Map> .Instance.Simulator, (Object)null) && Object.op_Inequality((Object)Singleton <Manager.Map> .Instance.Simulator.EnviroSky, (Object)null))
            {
                EnviroSky enviroSky = Singleton <Manager.Map> .Instance.Simulator.EnviroSky;
                enviroSky.fogSettings.distanceFog     = graphicData.Atmospheric;
                enviroSky.fogSettings.heightFog       = graphicData.Atmospheric;
                enviroSky.volumeLighting              = graphicData.Atmospheric;
                enviroSky.LightShafts.sunLightShafts  = graphicData.Atmospheric;
                enviroSky.LightShafts.moonLightShafts = graphicData.Atmospheric;
            }
            if (!Object.op_Inequality((Object)this.Wetstuff, (Object)null) || ((Behaviour)this.Wetstuff).get_enabled() == graphicData.Rain)
            {
                return;
            }
            ((Behaviour)this.Wetstuff).set_enabled(graphicData.Rain);
        }