public override void OnInspectorGUI(ParticleSystem s)
{
if (s_Texts == null)
{
s_Texts = new Texts();
}
if (s_PreviewTextureDirty)
{
base.m_ParticleSystemUI.m_ParticleSystem.GenerateNoisePreviewTexture(s_PreviewTexture);
s_PreviewTextureDirty = false;
}
bool flag = base.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner is ParticleSystemInspector;
if (flag)
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.BeginVertical(new GUILayoutOption[0]);
}
EditorGUI.BeginChangeCheck();
bool flag2 = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);
bool flag3 = EditorGUI.EndChangeCheck();
EditorGUI.BeginChangeCheck();
if (flag3)
{
if (flag2)
{
this.m_StrengthX.RemoveCurveFromEditor();
this.m_RemapX.RemoveCurveFromEditor();
}
else
{
this.m_StrengthX.RemoveCurveFromEditor();
this.m_StrengthY.RemoveCurveFromEditor();
this.m_StrengthZ.RemoveCurveFromEditor();
this.m_RemapX.RemoveCurveFromEditor();
this.m_RemapY.RemoveCurveFromEditor();
this.m_RemapZ.RemoveCurveFromEditor();
}
}
MinMaxCurveState state = this.m_StrengthX.state;
this.m_StrengthY.state = state;
this.m_StrengthZ.state = state;
state = this.m_RemapX.state;
this.m_RemapY.state = state;
this.m_RemapZ.state = state;
if (flag2)
{
this.m_StrengthX.m_DisplayName = s_Texts.x;
base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_StrengthX, s_Texts.y, this.m_StrengthY, s_Texts.z, this.m_StrengthZ, null, new GUILayoutOption[0]);
}
else
{
this.m_StrengthX.m_DisplayName = s_Texts.strength;
ModuleUI.GUIMinMaxCurve(s_Texts.strength, this.m_StrengthX, new GUILayoutOption[0]);
}
ModuleUI.GUIFloat(s_Texts.frequency, this.m_Frequency, new GUILayoutOption[0]);
ModuleUI.GUIMinMaxCurve(s_Texts.scrollSpeed, this.m_ScrollSpeed, new GUILayoutOption[0]);
ModuleUI.GUIToggle(s_Texts.damping, this.m_Damping, new GUILayoutOption[0]);
int num = ModuleUI.GUIInt(s_Texts.octaves, this.m_Octaves, new GUILayoutOption[0]);
using (new EditorGUI.DisabledScope(num == 1))
{
ModuleUI.GUIFloat(s_Texts.octaveMultiplier, this.m_OctaveMultiplier, new GUILayoutOption[0]);
ModuleUI.GUIFloat(s_Texts.octaveScale, this.m_OctaveScale, new GUILayoutOption[0]);
}
ModuleUI.GUIPopup(s_Texts.quality, this.m_Quality, s_Texts.qualityDropdown, new GUILayoutOption[0]);
bool flag4 = ModuleUI.GUIToggle(s_Texts.remap, this.m_RemapEnabled, new GUILayoutOption[0]);
using (new EditorGUI.DisabledScope(!flag4))
{
if (flag2)
{
this.m_RemapX.m_DisplayName = s_Texts.x;
base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_RemapX, s_Texts.y, this.m_RemapY, s_Texts.z, this.m_RemapZ, null, new GUILayoutOption[0]);
}
else
{
this.m_RemapX.m_DisplayName = s_Texts.remap;
ModuleUI.GUIMinMaxCurve(s_Texts.remapCurve, this.m_RemapX, new GUILayoutOption[0]);
}
}
if (flag)
{
GUILayout.EndVertical();
}
if ((EditorGUI.EndChangeCheck() || (this.m_ScrollSpeed.scalar.floatValue > 0f)) || (flag4 || flag3))
{
s_PreviewTextureDirty = true;
base.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner.Repaint();
}
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false) };
GUILayout.Label(s_Texts.previewTexture, this.previewTextureStyle, options);
if (flag)
{
GUILayout.EndHorizontal();
}
}