public static void DisplayElementType(StoryElementTypes type, string elementName, int width) { GUI.DrawTexture(new Rect(5f, 5f, width - 10f, 36f), UVNFSettings.GetElementStyle(type).normal.background); GUILayout.Space(5f); GUILayout.BeginHorizontal(); { GUILayout.Space(23f); GUILayout.Label(elementName, UVNFSettings.GetLabelStyle(type)); } GUILayout.EndHorizontal(); if (UVNFSettings.EditorSettings.ElementHints.ContainsKey(elementName)) { GUI.DrawTexture(new Rect(5f, 7f, 32f, 32f), UVNFSettings.EditorSettings.ElementHints[elementName]); } }
public static GUIStyle GetColorByElement(StoryElementTypes type) { GUIStyle newStyle = EditorSettings.UVNFSkin.button; Texture2D background = new Texture2D(1, 1); newStyle.normal.background = background; switch (type) { case StoryElementTypes.Audio: newStyle.normal.background.SetPixel(0, 0, new Color32().Audio()); break; case StoryElementTypes.Character: newStyle.normal.background.SetPixel(0, 0, new Color32().Character()); break; case StoryElementTypes.Scenery: newStyle.normal.background.SetPixel(0, 0, new Color32().Scene()); break; case StoryElementTypes.Story: newStyle.normal.background.SetPixel(0, 0, new Color32().Story()); break; case StoryElementTypes.Utility: newStyle.normal.background.SetPixel(0, 0, new Color32().Utility()); break; case StoryElementTypes.Other: newStyle.normal.background.SetPixel(0, 0, new Color32().Other()); break; } newStyle.normal.background.Apply(); return(newStyle); }
public static GUIStyle GetLabelStyle(StoryElementTypes type) { SetupElements(); return(_elementStyles[type].label); }
public static GUIStyle GetElementStyle(StoryElementTypes type) { SetupElements(); return(_elementStyles[type].button); }