| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEditor; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | namespace DCL.Skybox |
| | 7 | | { |
| | 8 | | public class SkyboxEditorStyles |
| | 9 | | { |
| | 10 | | private static SkyboxEditorStyles instance; |
| | 11 | | public static SkyboxEditorStyles Instance |
| | 12 | | { |
| | 13 | | get |
| | 14 | | { |
| 0 | 15 | | if (instance == null) |
| | 16 | | { |
| 0 | 17 | | instance = new SkyboxEditorStyles(); |
| | 18 | | } |
| 0 | 19 | | return instance; |
| | 20 | | } |
| | 21 | | } |
| | 22 | | public GUIStyle foldoutStyle; |
| | 23 | | public GUIStyle renderingMarkerStyle; |
| | 24 | | public GUIStyle configurationStyle; |
| | 25 | | public GUIStyle percentagePartStyle; |
| | 26 | | public GUIStyle transitioningBoxStyle; |
| | 27 | |
|
| 0 | 28 | | public SkyboxEditorStyles() |
| | 29 | | { |
| 0 | 30 | | if (foldoutStyle == null) |
| | 31 | | { |
| 0 | 32 | | foldoutStyle = new GUIStyle(EditorStyles.foldout); |
| 0 | 33 | | foldoutStyle.fixedWidth = 2; |
| | 34 | | } |
| | 35 | |
|
| 0 | 36 | | if (renderingMarkerStyle == null) |
| | 37 | | { |
| 0 | 38 | | renderingMarkerStyle = new GUIStyle(EditorStyles.label); |
| 0 | 39 | | renderingMarkerStyle.fontSize = 18; |
| | 40 | | } |
| | 41 | |
|
| 0 | 42 | | if (configurationStyle == null) |
| | 43 | | { |
| 0 | 44 | | configurationStyle = new GUIStyle(); |
| 0 | 45 | | configurationStyle.alignment = TextAnchor.MiddleCenter; |
| 0 | 46 | | configurationStyle.margin = new RectOffset(150, 200, 0, 0); |
| | 47 | | } |
| | 48 | |
|
| 0 | 49 | | if (percentagePartStyle == null) |
| | 50 | | { |
| 0 | 51 | | percentagePartStyle = new GUIStyle(); |
| 0 | 52 | | percentagePartStyle.alignment = TextAnchor.MiddleCenter; |
| | 53 | | } |
| | 54 | |
|
| 0 | 55 | | if (transitioningBoxStyle == null) |
| | 56 | | { |
| 0 | 57 | | transitioningBoxStyle = new GUIStyle("box"); |
| | 58 | | } |
| 0 | 59 | | } |
| | 60 | | } |
| | 61 | | } |