diff options
author | chai <chaifix@163.com> | 2021-09-08 10:52:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-08 10:52:35 +0800 |
commit | 21e186f75b504d832d9c7bef0456edd7d5d3155e (patch) | |
tree | e73c43fc78d0326f32da5fadfda57fa8e23c1d90 /Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledMessageDrawer.cs | |
parent | 7bd7b4c6c3be6840cab06aa4d8a38619bce44705 (diff) |
+behavior design
Diffstat (limited to 'Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledMessageDrawer.cs')
-rw-r--r-- | Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledMessageDrawer.cs | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledMessageDrawer.cs b/Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledMessageDrawer.cs deleted file mode 100644 index c2b02d6c..00000000 --- a/Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledMessageDrawer.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Cristian Pop - https://boxophobic.com/
-
-using UnityEngine;
-using UnityEditor;
-
-namespace Boxophobic.StyledGUI
-{
- [CustomPropertyDrawer(typeof(StyledMessage))]
- public class StyledMessageAttributeDrawer : PropertyDrawer
- {
- StyledMessage a;
-
- bool show;
- MessageType messageType;
-
- public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
- {
- show = property.boolValue;
-
- if (show)
- {
- a = (StyledMessage)attribute;
-
- if (a.Type == "None")
- {
- messageType = MessageType.None;
- }
- else if (a.Type == "Info")
- {
- messageType = MessageType.Info;
- }
- else if (a.Type == "Warning")
- {
- messageType = MessageType.Warning;
- }
- else if (a.Type == "Error")
- {
- messageType = MessageType.Error;
- }
-
- GUILayout.Space(a.Top);
- EditorGUILayout.HelpBox(a.Message, messageType);
- GUILayout.Space(a.Down);
- }
- }
-
- public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
- {
- return -2;
- }
- }
-}
|