public void ScrollView(string id, LayoutDelegate fadeFunc, params GUILayoutOption[] options) { Vector2 scroll = TryGetScrollStack(id); scroll = ExGUI.ScrollView(scroll, fadeFunc, options); RecordScrollValue(id, scroll); }
public void FoldoutGroupIndent(string id, string title, bool autoOpen, LayoutDelegate layoutFunc) { bool open = TryGetFadeStack(id, autoOpen); ExGUI.FoldoutGroupIndent(ref open, title, layoutFunc); RecordValue(id, open); }
public static void Group(string title, bool space, GUIStyle style, LayoutDelegate layoutFunc) { Vertical(style, delegate { Group(title, space, layoutFunc); }); }
public void FoldoutGroup(string title, bool autoOpen, LayoutDelegate layoutFunc, LayoutDelegate headerLayoutFunc) { bool open = TryGetFadeStack(title, autoOpen); ExGUI.FoldoutGroup(ref open, title, layoutFunc, headerLayoutFunc); RecordValue(title, open); }
public static void FoldoutGroup(ref bool foldoutValue, string title, LayoutDelegate layoutFunc, LayoutDelegate headerLayoutFunc) { Color cachedColor = GUI.color; GUI.color = new Color(cachedColor.r, cachedColor.g, cachedColor.b, 0.5f); EditorGUILayout.BeginHorizontal(ExStyles.MenuItemToolbarStyle); GUI.color = cachedColor; bool value = GUILayout.Toggle(foldoutValue, title, ExStyles.MenuItemToggleStyle); if (Event.current.button == ExStyles.FoldoutMouseId) { foldoutValue = value; } headerLayoutFunc(); EditorGUILayout.EndHorizontal(); if (foldoutValue) { cachedColor = GUI.color; GUI.color = new Color(cachedColor.r, cachedColor.g, cachedColor.b, (EditorGUIUtility.isProSkin ? 0.5f : 0.25f)); EditorGUILayout.BeginVertical(ExStyles.MenuItemBackgroundStyle); { GUI.color = cachedColor; EditorGUI.indentLevel++; layoutFunc(); EditorGUI.indentLevel--; EditorGUILayout.Separator(); } EditorGUILayout.EndVertical(); } }
public static Vector2 ScrollView(Vector2 scrollPosition, LayoutDelegate layoutFunc, params GUILayoutOption[] options) { Vector2 d = UnityEditor.EditorGUILayout.BeginScrollView(scrollPosition, options); layoutFunc(); UnityEditor.EditorGUILayout.EndScrollView(); return(d); }
public static void Group(string title, bool space, LayoutDelegate layoutFunc) { Title(title); layoutFunc(); if (space) { UnityEditor.EditorGUILayout.Space(); } }
public static void Horizontal(bool styled, LayoutDelegate layoutFunc, params GUILayoutOption[] options) { if (styled) { Horizontal(UnityEditor.EditorStyles.helpBox, layoutFunc, options); return; } Horizontal(layoutFunc, options); }
public static void Group(LayoutDelegate headerDraw, LayoutDelegate contentDraw) { if (headerDraw != null) { headerDraw(); } if (contentDraw != null) { contentDraw(); } }
public static void Group(GUIStyle style, LayoutDelegate headerDraw, LayoutDelegate layoutFunc) { if (style == null) { EditorGUILayout.BeginVertical(); } else { EditorGUILayout.BeginVertical(style); } Group(headerDraw, layoutFunc); EditorGUILayout.EndVertical(); }
public static void FoldoutGroup(string title, LayoutDelegate layoutFunc) { Color cachedColor = GUI.color; GUI.color = new Color(cachedColor.r, cachedColor.g, cachedColor.b, 0.5f); EditorGUILayout.BeginHorizontal(ExStyles.MenuItemToolbarStyle); GUI.color = cachedColor; GUILayout.Label(title, ExStyles.MenuItemToggleStyle); EditorGUILayout.EndHorizontal(); cachedColor = GUI.color; GUI.color = new Color(cachedColor.r, cachedColor.g, cachedColor.b, (EditorGUIUtility.isProSkin ? 0.5f : 0.25f)); EditorGUILayout.BeginVertical(ExStyles.MenuItemBackgroundStyle); GUI.color = cachedColor; EditorGUI.indentLevel++; layoutFunc(); EditorGUI.indentLevel--; EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); }
public static void Vertical(GUIStyle style, LayoutDelegate layoutFunc, params GUILayoutOption[] options) { UnityEditor.EditorGUILayout.BeginVertical(style, options); layoutFunc(); UnityEditor.EditorGUILayout.EndVertical(); }
public static void Horizontal(LayoutDelegate layoutFunc, params GUILayoutOption[] options) { UnityEditor.EditorGUILayout.BeginHorizontal(options); layoutFunc(); UnityEditor.EditorGUILayout.EndHorizontal(); }
public static void Indent(LayoutDelegate layoutFunc) { UnityEditor.EditorGUI.indentLevel = UnityEditor.EditorGUI.indentLevel + 1; layoutFunc(); UnityEditor.EditorGUI.indentLevel = UnityEditor.EditorGUI.indentLevel - 1; }
public static Vector2 ScrollView(Vector2 scrollPosition, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background, LayoutDelegate layoutFunc, params GUILayoutOption[] options) { Vector2 d = UnityEditor.EditorGUILayout.BeginScrollView(scrollPosition, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, background, options); layoutFunc(); UnityEditor.EditorGUILayout.EndScrollView(); return(d); }
// // // public static Vector2 ScrollView(Vector2 scrollPosition, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, LayoutDelegate layoutFunc, params GUILayoutOption[] options) { Vector2 d = UnityEditor.EditorGUILayout.BeginScrollView(scrollPosition, horizontalScrollbar, verticalScrollbar, options); layoutFunc(); UnityEditor.EditorGUILayout.EndScrollView(); return(d); }
public void ScrollView(string id, bool alwaysShowHorizontal, bool alwaysShowVertical, LayoutDelegate fadeFunc, params GUILayoutOption[] options) { Vector2 scroll = TryGetScrollStack(id); scroll = ExGUI.ScrollView(scroll, alwaysShowHorizontal, alwaysShowHorizontal, fadeFunc, options); RecordScrollValue(id, scroll); }
public static void Group(string title, LayoutDelegate layoutFunc) { Title(title); layoutFunc(); }