using UnityEngine; namespace Module.NavigationTool.Editor.Toolbar { public sealed class Styles { public GUIStyle popup; public GUIStyle button; public GUIStyle buttonNoPadding; public GUIStyle slider; public GUIStyle label; public GUIStyle labelCenter; public GUIStyle settingsGroup; private GUISkin skin; public void Initialize(GUISkin skin) { if (this.skin == skin) return; this.skin = skin; popup = new GUIStyle(skin.FindStyle("ToolbarPopup")); button = new GUIStyle(skin.FindStyle("toolbarbutton")); slider = new GUIStyle(skin.FindStyle("ToolbarSlider")); label = new GUIStyle(skin.FindStyle("ToolbarLabel")); buttonNoPadding = new GUIStyle(skin.FindStyle("toolbarbutton")) { padding = new RectOffset() }; labelCenter = new GUIStyle(skin.FindStyle("ToolbarLabel")) { alignment = TextAnchor.MiddleCenter }; settingsGroup = new GUIStyle { margin = new RectOffset(8, 0, 8, 0) }; } } }