From 21e186f75b504d832d9c7bef0456edd7d5d3155e Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 8 Sep 2021 10:52:35 +0800 Subject: +behavior design --- .../Editor/StyledInspector/StyledTextDrawer.cs | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledTextDrawer.cs (limited to 'Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledTextDrawer.cs') diff --git a/Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledTextDrawer.cs b/Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledTextDrawer.cs deleted file mode 100644 index 3850da2e..00000000 --- a/Assets/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledTextDrawer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Cristian Pop - https://boxophobic.com/ - -using UnityEngine; -using UnityEditor; - -namespace Boxophobic.StyledGUI -{ - [CustomPropertyDrawer(typeof(StyledText))] - public class StyledTextAttributeDrawer : PropertyDrawer - { - StyledText a; - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - a = (StyledText)attribute; - - GUIStyle styleLabel = new GUIStyle(EditorStyles.label) - { - richText = true, - wordWrap = true - }; - - styleLabel.alignment = a.alignment; - - GUILayout.Space(a.top); - - if (a.disabled == true) - { - GUI.enabled = false; - } - - GUILayout.Label(property.stringValue, styleLabel); - - GUI.enabled = true; - - GUILayout.Space(a.down); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return -2; - } - } -} - -- cgit v1.1-26-g67d0