Esempio n. 1
0
        public void OnGUI()
        {
            if (data != null)
            {
                scroll = UGL.BeginScrollView(scroll, EditorStyles.helpBox);
                UGL.BeginHorizontal(EditorStyles.miniButton);
                type      = (DataTypes)GUILayout.Toolbar((int)type, System.Enum.GetNames(typeof(DataTypes)));
                GUI.color = Color.green;
                if (GUILayout.Button("+"))
                {
                    data.Add(type, string.Empty);
                }
                GUI.color = Color.white;
                UGL.EndHorizontal();
                switch (type)
                {
                case DataTypes.Color:
                    ColorGUI();
                    break;

                case DataTypes.Float:
                    FloatGUI();
                    break;

                case DataTypes.Texture:
                    TextureGUI();
                    break;

                case DataTypes.Vector:
                    VectorGUI();
                    break;
                }
                UGL.EndScrollView();
                //UGL.EndVertical();
                if (data != null)
                {
                    data.SetValues();
                }
            }
        }
Esempio n. 2
0
 public static void SetData(ShaderEditor.ShaderEditorData data)
 {
     data.SetValues();
 }