Ver Fonte

Fix fog effect manager never being ready

Ready was never set during activation. This resulted in the associating
effect pane from updating the controls.
habeebweeb há 4 anos atrás
pai
commit
f3de7363a7

+ 2 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/EffectManagers/FogEffectManager.cs

@@ -6,7 +6,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
     {
         public const string header = "EFFECT_FOG";
         private GlobalFog Fog { get; set; }
-        public bool Ready { get; }
+        public bool Ready { get; private set; }
         public bool Active { get; private set; }
         private readonly float initialDistance = 4f;
         private readonly float initialDensity = 1f;
@@ -96,6 +96,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         {
             if (Fog == null)
             {
+                Ready = true;
                 Fog = GameMain.Instance.MainCamera.GetOrAddComponent<GlobalFog>();
                 if (Fog.fogShader == null) Fog.fogShader = Shader.Find("Hidden/GlobalFog");
                 Distance = initialDistance;