From a13f10139d33264fc9ebc5a15c75faf16fc7757e Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Jul 2021 18:47:37 +0800 Subject: +Action Tool --- Assets/ActionTool/Editor/ActionEditorStyles.cs | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Assets/ActionTool/Editor/ActionEditorStyles.cs (limited to 'Assets/ActionTool/Editor/ActionEditorStyles.cs') 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 -- cgit v1.1-26-g67d0