diff options
| author | chai <chaifix@163.com> | 2021-07-07 18:47:37 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-07-07 18:47:37 +0800 |
| commit | a13f10139d33264fc9ebc5a15c75faf16fc7757e (patch) | |
| tree | 9d6c40a21fc873c6e25ff4bbdeba663a73927427 /Assets/ActionTool/Editor/ActionEditorStyles.cs | |
| parent | 1bb4971cffac3851a119f16e815bfe42abfc2df6 (diff) | |
+Action Tool
Diffstat (limited to 'Assets/ActionTool/Editor/ActionEditorStyles.cs')
| -rw-r--r-- | Assets/ActionTool/Editor/ActionEditorStyles.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Assets/ActionTool/Editor/ActionEditorStyles.cs b/Assets/ActionTool/Editor/ActionEditorStyles.cs new file mode 100644 index 00000000..c7c15aaf --- /dev/null +++ b/Assets/ActionTool/Editor/ActionEditorStyles.cs @@ -0,0 +1,44 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEditor;
+
+namespace ActionTool
+{
+ internal class ActionEditorStyles
+ {
+ public GUIStyle textBold;
+
+ private static ActionEditorStyles s_instance;
+
+ public static ActionEditorStyles Get()
+ {
+ bool flag = s_instance == null;
+ if (flag)
+ {
+ s_instance = new ActionEditorStyles();
+ }
+ return s_instance;
+ }
+
+ private ActionEditorStyles()
+ {
+ InitStyle(out textBold, GUI.skin.label, s => {
+ s.fontStyle = FontStyle.Bold;
+ });
+ }
+
+ private delegate void Initter(GUIStyle style);
+ private static void InitStyle(out GUIStyle normal, GUIStyle other, Initter initter)
+ {
+ normal = new GUIStyle(other);
+ initter(normal);
+ }
+ private static void InitStyle(out GUIStyle normal, Initter initter)
+ {
+ normal = new GUIStyle();
+ initter(normal);
+ }
+
+ }
+}
\ No newline at end of file |
