UnityEditor.ModuleUI.GUIIntDraggableX2 C# (CSharp) Méthode

GUIIntDraggableX2() public static méthode

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
Résultat void
        public static void GUIIntDraggableX2(GUIContent mainLabel, GUIContent label1, SerializedProperty intProp1, GUIContent label2, SerializedProperty intProp2, params GUILayoutOption[] layoutOptions)
        {
            Rect rect = PrefixLabel(GetControlRect(13, layoutOptions), mainLabel);
            float width = (rect.width - 4f) * 0.5f;
            Rect rect2 = new Rect(rect.x, rect.y, width, rect.height);
            IntDraggable(rect2, label1, intProp1, 10f);
            rect2.x += width + 4f;
            IntDraggable(rect2, label2, intProp2, 10f);
        }

Usage Example

Exemple #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);
        }
All Usage Examples Of UnityEditor.ModuleUI::GUIIntDraggableX2