Beispiel #1
0
        public static int Draw(this IEnumerable <string> current, Rect area, int index, UnityLabel label = null, GUIStyle style = null, bool indention = true)
        {
            style = style ?? EditorStyles.popup;
            string name = label.IsNull() ? "" : label.ToString();

            return(EditorUI.Draw <int>(() => EditorGUI.Popup(area, name, index, current.ToArray(), style), indention, area));
        }
Beispiel #2
0
        public static int Draw(this IEnumerable <string> current, int index, UnityLabel label = null, GUIStyle style = null, bool indention = true)
        {
            style = style ?? EditorStyles.popup;
            var labelValue = label.IsNull() ? null : label.ToString();

            return(EditorUI.Draw(() => EditorGUILayout.Popup(labelValue, index, current.ToArray(), style), indention));
        }
Beispiel #3
0
        public static Vector4 DrawVector4(this Vector4 current, Rect area, UnityLabel label = null, bool indention = true)
        {
            string name = label.IsNull() ? null : label.ToString();

            return(EditorUI.Draw <Vector3>(() => EditorGUI.Vector4Field(area, name, current), indention, area));
        }
Beispiel #4
0
 public static Vector4 DrawVector4(this Vector4 current, UnityLabel label = null, bool indention = true)
 {
     return(EditorUI.Draw(() => EditorGUILayout.Vector4Field(label.ToString(), current, EditorUI.CreateLayout()), indention));
 }