GUIIntDraggableX2() public static method

public static GUIIntDraggableX2 ( GUIContent mainLabel, GUIContent label1, UnityEditor.SerializedProperty intProp1, GUIContent label2, UnityEditor.SerializedProperty intProp2 ) : void
mainLabel UnityEngine.GUIContent
label1 UnityEngine.GUIContent
intProp1 UnityEditor.SerializedProperty
label2 UnityEngine.GUIContent
intProp2 UnityEditor.SerializedProperty
return void
Exemplo n.º 1
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (UVModuleUI.s_Texts == null)
            {
                UVModuleUI.s_Texts = new UVModuleUI.Texts();
            }
            ModuleUI.GUIIntDraggableX2(UVModuleUI.s_Texts.tiles, UVModuleUI.s_Texts.tilesX, this.m_TilesX, UVModuleUI.s_Texts.tilesY, this.m_TilesY);
            int num1 = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types);

            if (num1 == 1)
            {
                ModuleUI.GUIToggle(UVModuleUI.s_Texts.randomRow, this.m_RandomRow);
                if (!this.m_RandomRow.boolValue)
                {
                    ModuleUI.GUIInt(UVModuleUI.s_Texts.row, this.m_RowIndex);
                }
            }
            if (num1 == 1)
            {
                this.m_FrameOverTime.m_RemapValue = (float)this.m_TilesX.intValue;
            }
            if (num1 == 0)
            {
                this.m_FrameOverTime.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue);
            }
            ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.frameOverTime, this.m_FrameOverTime);
            double num2 = (double)ModuleUI.GUIFloat(UVModuleUI.s_Texts.cycles, this.m_Cycles);
        }
Exemplo n.º 2
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (UVModuleUI.s_Texts == null)
            {
                UVModuleUI.s_Texts = new UVModuleUI.Texts();
            }
            ModuleUI.GUIIntDraggableX2(UVModuleUI.s_Texts.tiles, UVModuleUI.s_Texts.tilesX, this.m_TilesX, UVModuleUI.s_Texts.tilesY, this.m_TilesY);
            int num = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types);

            if (num == 1)
            {
                ModuleUI.GUIToggle(UVModuleUI.s_Texts.randomRow, this.m_RandomRow);
                if (!this.m_RandomRow.boolValue)
                {
                    ModuleUI.GUIInt(UVModuleUI.s_Texts.row, this.m_RowIndex);
                }
            }
            if (num == 1)
            {
                this.m_FrameOverTime.m_RemapValue = (float)this.m_TilesX.intValue;
                this.m_StartFrame.m_RemapValue    = (float)this.m_TilesX.intValue;
            }
            if (num == 0)
            {
                this.m_FrameOverTime.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue);
                this.m_StartFrame.m_RemapValue    = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue - 1);
            }
            ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.frameOverTime, this.m_FrameOverTime);
            ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.startFrame, this.m_StartFrame);
            ModuleUI.GUIFloat(UVModuleUI.s_Texts.cycles, this.m_Cycles);
            this.m_UVChannelMask.intValue = (int)((UVChannelFlags)ModuleUI.GUIEnumMask(UVModuleUI.s_Texts.uvChannelMask, (UVChannelFlags)this.m_UVChannelMask.intValue));
        }
Exemplo n.º 3
0
        public override void OnInspectorGUI(InitialModuleUI initial)
        {
            int num = ModuleUI.GUIPopup(UVModuleUI.s_Texts.mode, this.m_Mode, UVModuleUI.s_Texts.modes, new GUILayoutOption[0]);

            if (!this.m_Mode.hasMultipleDifferentValues)
            {
                if (num == 0)
                {
                    ModuleUI.GUIIntDraggableX2(UVModuleUI.s_Texts.tiles, UVModuleUI.s_Texts.tilesX, this.m_TilesX, UVModuleUI.s_Texts.tilesY, this.m_TilesY, new GUILayoutOption[0]);
                    int num2 = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types, new GUILayoutOption[0]);
                    if (num2 == 1)
                    {
                        ModuleUI.GUIToggle(UVModuleUI.s_Texts.randomRow, this.m_RandomRow, new GUILayoutOption[0]);
                        if (!this.m_RandomRow.boolValue)
                        {
                            ModuleUI.GUIInt(UVModuleUI.s_Texts.row, this.m_RowIndex, new GUILayoutOption[0]);
                        }
                        this.m_FrameOverTime.m_RemapValue = (float)this.m_TilesX.intValue;
                        this.m_StartFrame.m_RemapValue    = (float)this.m_TilesX.intValue;
                    }
                    else
                    {
                        this.m_FrameOverTime.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue);
                        this.m_StartFrame.m_RemapValue    = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue);
                    }
                }
                else
                {
                    this.DoListOfSpritesGUI();
                    this.ValidateSpriteList();
                    this.m_FrameOverTime.m_RemapValue = (float)this.m_Sprites.arraySize;
                    this.m_StartFrame.m_RemapValue    = (float)this.m_Sprites.arraySize;
                }
                ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.frameOverTime, this.m_FrameOverTime, new GUILayoutOption[0]);
                ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.startFrame, this.m_StartFrame, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(UVModuleUI.s_Texts.cycles, this.m_Cycles, new GUILayoutOption[0]);
            bool disabled = false;

            ParticleSystem[] particleSystems = this.m_ParticleSystemUI.m_ParticleSystems;
            for (int i = 0; i < particleSystems.Length; i++)
            {
                ParticleSystem         particleSystem = particleSystems[i];
                ParticleSystemRenderer component      = particleSystem.GetComponent <ParticleSystemRenderer>();
                if (component != null && component.renderMode == ParticleSystemRenderMode.Mesh)
                {
                    disabled = true;
                    break;
                }
            }
            using (new EditorGUI.DisabledScope(disabled))
            {
                ModuleUI.GUIFloat(UVModuleUI.s_Texts.flipU, this.m_FlipU, new GUILayoutOption[0]);
                ModuleUI.GUIFloat(UVModuleUI.s_Texts.flipV, this.m_FlipV, new GUILayoutOption[0]);
            }
            ModuleUI.GUIEnumMaskUVChannelFlags(UVModuleUI.s_Texts.uvChannelMask, this.m_UVChannelMask, new GUILayoutOption[0]);
        }
Exemplo n.º 4
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            ModuleUI.GUIIntDraggableX2(s_Texts.tiles, s_Texts.tilesX, this.m_TilesX, s_Texts.tilesY, this.m_TilesY, new GUILayoutOption[0]);
            int num = ModuleUI.GUIPopup(s_Texts.animation, this.m_AnimationType, s_Texts.types, new GUILayoutOption[0]);

            if (num == 1)
            {
                ModuleUI.GUIToggle(s_Texts.randomRow, this.m_RandomRow, new GUILayoutOption[0]);
                if (!this.m_RandomRow.boolValue)
                {
                    ModuleUI.GUIInt(s_Texts.row, this.m_RowIndex, new GUILayoutOption[0]);
                }
            }
            switch (num)
            {
            case 1:
                this.m_FrameOverTime.m_RemapValue = this.m_TilesX.intValue;
                this.m_StartFrame.m_RemapValue    = this.m_TilesX.intValue;
                break;

            case 0:
                this.m_FrameOverTime.m_RemapValue = this.m_TilesX.intValue * this.m_TilesY.intValue;
                this.m_StartFrame.m_RemapValue    = this.m_TilesX.intValue * this.m_TilesY.intValue;
                break;
            }
            ModuleUI.GUIMinMaxCurve(s_Texts.frameOverTime, this.m_FrameOverTime, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(s_Texts.startFrame, this.m_StartFrame, new GUILayoutOption[0]);
            ModuleUI.GUIFloat(s_Texts.cycles, this.m_Cycles, new GUILayoutOption[0]);
            ParticleSystemRenderer component = base.m_ParticleSystemUI.m_ParticleSystem.GetComponent <ParticleSystemRenderer>();

            using (new EditorGUI.DisabledScope((component != null) && (component.renderMode == ParticleSystemRenderMode.Mesh)))
            {
                ModuleUI.GUIFloat(s_Texts.flipU, this.m_FlipU, new GUILayoutOption[0]);
                ModuleUI.GUIFloat(s_Texts.flipV, this.m_FlipV, new GUILayoutOption[0]);
            }
            this.m_UVChannelMask.intValue = (int)((UVChannelFlags)ModuleUI.GUIEnumMask(s_Texts.uvChannelMask, (UVChannelFlags)this.m_UVChannelMask.intValue, new GUILayoutOption[0]));
        }