protected virtual void SetVisibilityState(ModuleUI.VisibilityState newState)
{
if (newState != this.m_VisibilityState)
{
if (newState == ModuleUI.VisibilityState.VisibleAndFolded)
{
ParticleSystemCurveEditor particleSystemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
foreach (SerializedProperty current in this.m_ModuleCurves)
{
if (particleSystemCurveEditor.IsAdded(current))
{
this.m_CurvesRemovedWhenFolded.Add(current);
particleSystemCurveEditor.SetVisible(current, false);
}
}
particleSystemCurveEditor.Refresh();
}
else if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
{
ParticleSystemCurveEditor particleSystemCurveEditor2 = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
foreach (SerializedProperty current2 in this.m_CurvesRemovedWhenFolded)
{
particleSystemCurveEditor2.SetVisible(current2, true);
}
this.m_CurvesRemovedWhenFolded.Clear();
particleSystemCurveEditor2.Refresh();
}
this.m_VisibilityState = newState;
SessionState.SetInt(base.GetUniqueModuleName(), (int)this.m_VisibilityState);
if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
{
this.Init();
}
}
}