public void SetupGUI() { backgroundStyle = new GUIStyle(GUI.skin.box); backgroundStyle.contentOffset = new Vector2(2, 2); expandRight = ResourceManager.LoadTexture("Textures/expandRight.png"); itemHeight = GUI.skin.label.CalcHeight(new GUIContent("text"), 100); selectedLabel = new GUIStyle(GUI.skin.label); selectedLabel.normal.background = GUIExt.ColorToTex(new Color(0.4f, 0.4f, 0.4f)); }
public static bool Init() { Background = ResourceManager.LoadTexture("Textures/background.png"); AALineTex = ResourceManager.LoadTexture("Textures/AALine.png"); GUIBox = ResourceManager.LoadTexture("Textures/NE_Box.png"); GUIButton = ResourceManager.LoadTexture("Textures/NE_Button.png"); if (!Background || !AALineTex || !GUIBox || !GUIButton) { return(false); } // Styles nodeSkin = Object.Instantiate <GUISkin> (GUI.skin); nodeSkin.label.normal.textColor = new Color(0.7f, 0.7f, 0.7f); nodeSkin.box.normal.textColor = new Color(0.7f, 0.7f, 0.7f); nodeSkin.box.normal.background = GUIBox; nodeSkin.button.normal.textColor = new Color(0.7f, 0.7f, 0.7f); nodeSkin.button.normal.background = GUIButton; nodeSkin.textArea.normal.background = GUIBox; nodeSkin.textArea.active.background = GUIBox; nodeLabel = nodeSkin.label; nodeLabelBold = new GUIStyle(nodeLabel); nodeLabelBold.fontStyle = FontStyle.Bold; nodeLabelSelected = new GUIStyle(nodeLabel); nodeLabelSelected.normal.background = GUIExt.ColorToTex(new Color(0.4f, 0.4f, 0.4f)); return(true); }