diff options
Diffstat (limited to 'Assets/UI_Extension/Editor/GUIUtils.cs')
-rw-r--r-- | Assets/UI_Extension/Editor/GUIUtils.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Assets/UI_Extension/Editor/GUIUtils.cs b/Assets/UI_Extension/Editor/GUIUtils.cs new file mode 100644 index 0000000..5b881c6 --- /dev/null +++ b/Assets/UI_Extension/Editor/GUIUtils.cs @@ -0,0 +1,37 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEditor;
+
+namespace UIExt
+{
+ internal static class GUIUtils
+ {
+
+ public static void DrawLine()
+ {
+
+ }
+
+ public static void DrawHorizontalline(Color color, Vector2 left, float length, int thickness = 1, int padding = 0)
+ {
+ Rect r = EditorGUILayout.GetControlRect(GUILayout.Height(padding + thickness));
+ r.x = left.x;
+ r.y = left.y;
+ r.width = length;
+ EditorGUI.DrawRect(r, color);
+ GUILayout.Space(-10f);
+ }
+
+ public static void DrawVerticleline(Color color, Vector2 top, float height, int thickness = 1, int padding = 0)
+ {
+ Rect r = EditorGUILayout.GetControlRect(GUILayout.Width(padding + thickness));
+ r.x = top.x;
+ r.y = top.y;
+ r.height = height;
+ EditorGUI.DrawRect(r, color);
+ GUILayout.Space(-10f);
+ }
+
+ }
+}
|