Ejemplo n.º 1
0
 protected override void Init()
 {
     if (this.m_Modes[0] == null)
     {
         if (CustomDataModuleUI.s_Texts == null)
         {
             CustomDataModuleUI.s_Texts = new CustomDataModuleUI.Texts();
         }
         for (int i = 0; i < 2; i++)
         {
             this.m_Modes[i] = base.GetProperty("mode" + i);
             this.m_VectorComponentCount[i] = base.GetProperty("vectorComponentCount" + i);
             this.m_Colors[i]      = new SerializedMinMaxGradient(this, "color" + i);
             this.m_ColorLabels[i] = base.GetProperty("colorLabel" + i);
             for (int j = 0; j < 4; j++)
             {
                 this.m_Vectors[i, j] = new SerializedMinMaxCurve(this, GUIContent.none, string.Concat(new object[]
                 {
                     "vector",
                     i,
                     "_",
                     j
                 }), ModuleUI.kUseSignedRange);
                 this.m_VectorLabels[i, j] = base.GetProperty(string.Concat(new object[]
                 {
                     "vectorLabel",
                     i,
                     "_",
                     j
                 }));
             }
         }
     }
 }
Ejemplo n.º 2
0
 public override void OnInspectorGUI(InitialModuleUI initial)
 {
     if (CustomDataModuleUI.s_Texts == null)
     {
         CustomDataModuleUI.s_Texts = new CustomDataModuleUI.Texts();
     }
     for (int i = 0; i < 2; i++)
     {
         GUILayout.BeginVertical("Custom" + (i + 1), GUI.skin.window, new GUILayoutOption[0]);
         CustomDataModuleUI.Mode mode = (CustomDataModuleUI.Mode)ModuleUI.GUIPopup(CustomDataModuleUI.s_Texts.mode, this.m_Modes[i], CustomDataModuleUI.s_Texts.modes, new GUILayoutOption[0]);
         if (mode == CustomDataModuleUI.Mode.Vector)
         {
             int num = Mathf.Min(ModuleUI.GUIInt(CustomDataModuleUI.s_Texts.vectorComponentCount, this.m_VectorComponentCount[i], new GUILayoutOption[0]), 4);
             for (int j = 0; j < num; j++)
             {
                 ModuleUI.GUIMinMaxCurve(CustomDataModuleUI.s_Texts.components[j], this.m_Vectors[i, j], new GUILayoutOption[0]);
             }
         }
         else if (mode == CustomDataModuleUI.Mode.Color)
         {
             base.GUIMinMaxGradient(CustomDataModuleUI.s_Texts.color, this.m_Colors[i], true, new GUILayoutOption[0]);
         }
         GUILayout.EndVertical();
     }
 }