열차 목업의 내부 확인용 프로젝트
smchoi
2024-07-31 9fe33c1ae076b0f6501619388e6b4cc872b76f80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//////////////////////////////////////////////////////
// MK Glow Editor Helper Styles                           //
//                                                    //
// Created by Michael Kremmel                       //
// www.michaelkremmel.de                            //
// Copyright © 2020 All rights reserved.            //
//////////////////////////////////////////////////////
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
 
namespace MK.Glow.Editor
{
    public static partial class EditorHelper
    {
        //Based on Postprocessing stack styles to match the postprocessing stack ui
        private static class EditorStyles
        {
            public static readonly GUIStyle rightAlignetLabel = new GUIStyle(UnityEditor.EditorStyles.label) { alignment = TextAnchor.MiddleRight };
 
            public static readonly GUIStyle largeHeader = new GUIStyle(UnityEditor.EditorStyles.label) { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, fontSize = 18 };
 
            public static readonly GUIStyle headerCheckbox = new GUIStyle("ShurikenCheckMark");
            public static readonly GUIStyle headerCheckboxMixed = new GUIStyle("ShurikenCheckMarkMixed");
 
            public static readonly GUIStyle smallTickbox = new GUIStyle("ShurikenToggle");
 
            static readonly Color splitterDark = new Color(0.12f, 0.12f, 0.12f, 1.333f);
            static readonly Color splitterLight = splitterLight = new Color(0.6f, 0.6f, 0.6f, 1.333f);
            public static Color splitter { get { return EditorGUIUtility.isProSkin ? splitterDark : splitterLight; } }
 
            static readonly Texture2D paneOptionsIconDark;
            static readonly Texture2D paneOptionsIconLight;
 
            public static Texture2D paneOptionsIcon { get { return EditorGUIUtility.isProSkin ? paneOptionsIconDark : paneOptionsIconLight; } }
 
            public static readonly GUIStyle headerLabel = new GUIStyle(UnityEditor.EditorStyles.miniLabel);
 
            static readonly Color headerBackgroundDark = new Color(0.1f, 0.1f, 0.1f, 0.2f);
            static readonly Color headerBackgroundLight = new Color(1f, 1f, 1f, 0.2f);
            public static Color headerBackground { get { return EditorGUIUtility.isProSkin ? headerBackgroundDark : headerBackgroundLight; } }
 
            public static readonly GUIStyle wheelLabel = new GUIStyle(UnityEditor.EditorStyles.miniLabel);
            public static readonly GUIStyle wheelThumb = new GUIStyle("ColorPicker2DThumb");
            public static readonly Vector2 wheelThumbSize = new Vector2(
                    !Mathf.Approximately(wheelThumb.fixedWidth, 0f) ? wheelThumb.fixedWidth : wheelThumb.padding.horizontal,
                    !Mathf.Approximately(wheelThumb.fixedHeight, 0f) ? wheelThumb.fixedHeight : wheelThumb.padding.vertical
                );
 
            public static readonly GUIStyle preLabel = new GUIStyle("ShurikenLabel");
 
            static EditorStyles()
            {
                paneOptionsIconDark = (Texture2D)EditorGUIUtility.Load("Builtin Skins/DarkSkin/Images/pane options.png");
                paneOptionsIconLight = (Texture2D)EditorGUIUtility.Load("Builtin Skins/LightSkin/Images/pane options.png");
            }
        }
    }
}
#endif