GUIEnumMask() public static method

public static GUIEnumMask ( GUIContent label, Enum enumValue ) : Enum
label UnityEngine.GUIContent
enumValue System.Enum
return System.Enum
Esempio 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 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));
        }
Esempio n. 2
0
        public override void OnInspectorGUI(InitialModuleUI initial)
        {
            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, new GUILayoutOption[0]);
            int num = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types, new GUILayoutOption[0]);

            if (num == 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]);
                }
            }
            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);
            }
            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]);
            }
            this.m_UVChannelMask.intValue = (int)((UVChannelFlags)ModuleUI.GUIEnumMask(UVModuleUI.s_Texts.uvChannelMask, (UVChannelFlags)this.m_UVChannelMask.intValue, new GUILayoutOption[0]));
        }
Esempio n. 3
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]));
        }