GUIMinMaxRange() public static method

public static GUIMinMaxRange ( GUIContent label, UnityEditor.SerializedProperty vec2Prop ) : void
label UnityEngine.GUIContent
vec2Prop UnityEditor.SerializedProperty
return void
Beispiel #1
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (RotationByVelocityModuleUI.s_Texts == null)
            {
                RotationByVelocityModuleUI.s_Texts = new RotationByVelocityModuleUI.Texts();
            }
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(RotationByVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag)
                {
                    this.m_Z.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_X.RemoveCurveFromEditor();
                    this.m_Y.RemoveCurveFromEditor();
                    this.m_Z.RemoveCurveFromEditor();
                }
            }
            if (flag)
            {
                this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.z;
                base.GUITripleMinMaxCurve(GUIContent.none, RotationByVelocityModuleUI.s_Texts.x, this.m_X, RotationByVelocityModuleUI.s_Texts.y, this.m_Y, RotationByVelocityModuleUI.s_Texts.z, this.m_Z, null);
            }
            else
            {
                this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(RotationByVelocityModuleUI.s_Texts.rotation, this.m_Z);
            }
            ModuleUI.GUIMinMaxRange(RotationByVelocityModuleUI.s_Texts.velocityRange, this.m_Range);
        }
Beispiel #2
0
        public override void OnInspectorGUI(InitialModuleUI initial)
        {
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(RotationByVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (!flag)
                {
                    this.m_X.RemoveCurveFromEditor();
                    this.m_Y.RemoveCurveFromEditor();
                }
            }
            if (!this.m_Z.stateHasMultipleDifferentValues)
            {
                this.m_X.SetMinMaxState(this.m_Z.state, flag);
                this.m_Y.SetMinMaxState(this.m_Z.state, flag);
            }
            MinMaxCurveState state = this.m_Z.state;

            if (flag)
            {
                this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.z;
                base.GUITripleMinMaxCurve(GUIContent.none, RotationByVelocityModuleUI.s_Texts.x, this.m_X, RotationByVelocityModuleUI.s_Texts.y, this.m_Y, RotationByVelocityModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(RotationByVelocityModuleUI.s_Texts.rotation, this.m_Z, new GUILayoutOption[0]);
            }
            using (new EditorGUI.DisabledScope(state == MinMaxCurveState.k_Scalar || state == MinMaxCurveState.k_TwoScalars))
            {
                ModuleUI.GUIMinMaxRange(RotationByVelocityModuleUI.s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]);
            }
        }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (ColorByVelocityModuleUI.s_Texts == null)
     {
         ColorByVelocityModuleUI.s_Texts = new ColorByVelocityModuleUI.Texts();
     }
     this.GUIMinMaxGradient(ColorByVelocityModuleUI.s_Texts.color, this.m_Gradient);
     ModuleUI.GUIMinMaxRange(ColorByVelocityModuleUI.s_Texts.velocityRange, this.m_Range);
 }
 public override void OnInspectorGUI(InitialModuleUI initial)
 {
     if (ColorByVelocityModuleUI.s_Texts == null)
     {
         ColorByVelocityModuleUI.s_Texts = new ColorByVelocityModuleUI.Texts();
     }
     base.GUIMinMaxGradient(ColorByVelocityModuleUI.s_Texts.color, this.m_Gradient, false, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxRange(ColorByVelocityModuleUI.s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]);
 }
Beispiel #5
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     base.GUIMinMaxGradient(s_Texts.color, this.m_Gradient);
     ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range);
 }
Beispiel #6
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (SizeByVelocityModuleUI.s_Texts == null)
     {
         SizeByVelocityModuleUI.s_Texts = new SizeByVelocityModuleUI.Texts();
     }
     ModuleUI.GUIMinMaxCurve(SizeByVelocityModuleUI.s_Texts.size, this.m_Curve);
     ModuleUI.GUIMinMaxRange(SizeByVelocityModuleUI.s_Texts.velocityRange, this.m_Range);
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Curve);
     ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range);
 }
Beispiel #8
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (SizeByVelocityModuleUI.s_Texts == null)
            {
                SizeByVelocityModuleUI.s_Texts = new SizeByVelocityModuleUI.Texts();
            }
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(SizeByVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag)
                {
                    this.m_X.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_X.RemoveCurveFromEditor();
                    this.m_Y.RemoveCurveFromEditor();
                    this.m_Z.RemoveCurveFromEditor();
                }
            }
            SerializedMinMaxCurve arg_9C_0 = this.m_Z;
            MinMaxCurveState      state    = this.m_X.state;

            this.m_Y.state = state;
            arg_9C_0.state = state;
            MinMaxCurveState state2 = this.m_Z.state;

            if (flag)
            {
                this.m_X.m_DisplayName = SizeByVelocityModuleUI.s_Texts.x;
                base.GUITripleMinMaxCurve(GUIContent.none, SizeByVelocityModuleUI.s_Texts.x, this.m_X, SizeByVelocityModuleUI.s_Texts.y, this.m_Y, SizeByVelocityModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_X.m_DisplayName = SizeByVelocityModuleUI.s_Texts.size;
                ModuleUI.GUIMinMaxCurve(SizeByVelocityModuleUI.s_Texts.size, this.m_X, new GUILayoutOption[0]);
            }
            using (new EditorGUI.DisabledScope(state2 == MinMaxCurveState.k_Scalar || state2 == MinMaxCurveState.k_TwoScalars))
            {
                ModuleUI.GUIMinMaxRange(SizeByVelocityModuleUI.s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]);
            }
        }
Beispiel #9
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag)
                {
                    this.m_Z.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_X.RemoveCurveFromEditor();
                    this.m_Y.RemoveCurveFromEditor();
                    this.m_Z.RemoveCurveFromEditor();
                }
            }
            MinMaxCurveState state = this.m_Z.state;

            this.m_Y.state = state;
            this.m_X.state = state;
            MinMaxCurveState state2 = this.m_Z.state;

            if (flag)
            {
                this.m_Z.m_DisplayName = s_Texts.z;
                base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_Z.m_DisplayName = s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Z, new GUILayoutOption[0]);
            }
            using (new EditorGUI.DisabledScope((state2 == MinMaxCurveState.k_Scalar) || (state2 == MinMaxCurveState.k_TwoScalars)))
            {
                ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]);
            }
        }