summaryrefslogtreecommitdiff
path: root/Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-08 10:52:35 +0800
committerchai <chaifix@163.com>2021-09-08 10:52:35 +0800
commit21e186f75b504d832d9c7bef0456edd7d5d3155e (patch)
treee73c43fc78d0326f32da5fadfda57fa8e23c1d90 /Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs
parent7bd7b4c6c3be6840cab06aa4d8a38619bce44705 (diff)
+behavior design
Diffstat (limited to 'Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs')
-rw-r--r--Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs48
1 files changed, 0 insertions, 48 deletions
diff --git a/Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs b/Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs
deleted file mode 100644
index 8950ff7b..00000000
--- a/Assets/BOXOPHOBIC/Utils/Editor/StyledGUI/DrawWindowCategory.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Cristian Pop - https://boxophobic.com/
-
-using UnityEngine;
-using UnityEditor;
-using Boxophobic.Constants;
-
-namespace Boxophobic.StyledGUI
-{
- public partial class StyledGUI
- {
- public static void DrawWindowCategory(string bannerText)
- {
- var position = GUILayoutUtility.GetRect(0, 0, 40, 0);
-
- var categoryFullRect = new Rect(position.position.x, position.position.y + 10, position.width, position.height);
- var categoryBeginRect = new Rect(categoryFullRect.position.x, categoryFullRect.position.y, 10, 20);
- var categoryMiddleRect = new Rect(categoryFullRect.position.x + 10, categoryFullRect.position.y, categoryFullRect.xMax - 41, 20);
- var categoryEndRect = new Rect(categoryFullRect.xMax - 13, categoryFullRect.position.y, 10, 20);
- var titleRect = new Rect(categoryFullRect.position.x, categoryFullRect.position.y, categoryFullRect.width, 18);
-
- if (EditorGUIUtility.isProSkin)
- {
- GUI.color = CONSTANT.ColorDarkGray;
- }
- else
- {
- GUI.color = CONSTANT.ColorLightGray;
- }
-
- //Workaround for flickering images in CustomInspector with Attribute
- GUIStyle styleB = new GUIStyle();
- styleB.normal.background = CONSTANT.CategoryImageBegin;
- EditorGUI.LabelField(categoryBeginRect, GUIContent.none, styleB);
-
- GUIStyle styleM = new GUIStyle();
- styleM.normal.background = CONSTANT.CategoryImageMiddle;
- EditorGUI.LabelField(categoryMiddleRect, GUIContent.none, styleM);
-
- GUIStyle styleE = new GUIStyle();
- styleE.normal.background = CONSTANT.CategoryImageEnd;
- EditorGUI.LabelField(categoryEndRect, GUIContent.none, styleE);
-
- GUI.color = Color.white;
- GUI.Label(titleRect, bannerText, CONSTANT.BoldTextStyle);
- }
- }
-}
-