@@ -10,6 +10,9 @@ public class TMPEffectsSettingsEditor : UnityEditor.Editor
1010 {
1111 internal class Styles
1212 {
13+ public static readonly GUIContent optOutBugReport = new GUIContent ( "Opt out of Bug Report Window" ,
14+ "Whether you will get a bug report window for some TMPEffects bugs or not." ) ;
15+
1316 public static readonly GUIContent defaultAnimationDatabase = new GUIContent ( "Default Animation Database" ,
1417 "The default animation database that TMPAnimator components will use." ) ;
1518
@@ -46,6 +49,18 @@ public override void OnInspectorGUI()
4649 EditorGUILayout . PropertyField ( defaultKeywordDatabase , Styles . defaultKeywordDatabase ) ;
4750 EditorGUILayout . PropertyField ( globalKeywordDatabase , Styles . globalKeywordDatabase ) ;
4851 EditorGUI . indentLevel -- ;
52+
53+ EditorGUILayout . Space ( ) ;
54+
55+ EditorGUILayout . LabelField ( "Miscellaneous" , EditorStyles . boldLabel ) ;
56+ EditorGUI . indentLevel ++ ;
57+ bool optOutofWindow = EditorPrefs . GetBool ( TMPEffectsEditorPrefsKeys . OptOutKey , true ) ;
58+ bool newOptOutofWindow = EditorGUILayout . Toggle ( Styles . optOutBugReport , optOutofWindow ) ;
59+ if ( newOptOutofWindow != optOutofWindow )
60+ {
61+ EditorPrefs . SetBool ( TMPEffectsEditorPrefsKeys . OptOutKey , newOptOutofWindow ) ;
62+ }
63+ EditorGUI . indentLevel -- ;
4964
5065 if ( serializedObject . hasModifiedProperties )
5166 serializedObject . ApplyModifiedProperties ( ) ;
@@ -76,28 +91,27 @@ static UnityEngine.Object GetSettings()
7691
7792 public const string SettingsPath = "Project/TMPEffects" ;
7893
79- class Styles
80- {
81- }
82-
8394 public TMPEffectsSettingsProvider ( ) : base ( "Project/TMPEffects" , SettingsScope . Project )
8495 {
8596 }
8697
87- public override void OnActivate ( string searchContext , VisualElement rootElement )
88- {
89- }
90-
9198 public override void OnGUI ( string searchContext )
9299 {
93- bool optOutofWindow = EditorPrefs . GetBool ( TMPEffectsEditorPrefsKeys . OptOutKey , true ) ;
94- bool newOptOutofWindow = EditorGUILayout . Toggle ( "Opt out of bug report window" , optOutofWindow ) ;
95- if ( newOptOutofWindow != optOutofWindow )
96- {
97- EditorPrefs . SetBool ( TMPEffectsEditorPrefsKeys . OptOutKey , newOptOutofWindow ) ;
98- }
99-
100- EditorGUILayout . Space ( ) ;
100+ EditorGUI . indentLevel ++ ;
101+
102+ GUIStyle style = new GUIStyle ( GUI . skin . label ) ;
103+ style . richText = true ;
104+
105+ GUIContent content = new GUIContent ( ) ;
106+ content . text = @"Settings for the TMPEffects package.
107+
108+ Full <color=lightblue>DOCUMENTATION</color> can be found here: https://tmpeffects.luca3317.dev
109+ The <color=lightblue>GITHUB</color> repository can be found here: https://github.com/Luca3317/TMPEffects" ;
110+
111+ float height = style . CalcHeight ( content , EditorGUIUtility . currentViewWidth ) ;
112+ EditorGUILayout . SelectableLabel ( content . text , style , GUILayout . Height ( height ) ) ;
113+ EditorGUI . indentLevel -- ;
101114 }
115+
102116 }
103117}
0 commit comments