Esempio n. 1
0
 /// <summary>
 /// Initialize menu-related styles
 /// </summary>
 private void InitializeStyles()
 {
     if (panelStyle == null)
     {
         panelStyle = new GUIStyle(GUI.skin.box);
         panelStyle.normal.background =
             Texture2DExtensions.MakeTexture(1, 1, new Color(0.94f, 0.94f, 0.94f, 1f));
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Prepares the styles used by this item
        /// </summary>
        protected virtual void InitializeStyles()
        {
            if (defaultMenuStyle == null)
            {
                defaultMenuStyle = new GUIStyle(GUI.skin.label);
                defaultMenuStyle.normal.textColor = Color.black;
            }

            defaultMenuStyle.padding = NodePadding;

            if (selectedItemBackground == null)
            {
                selectedItemBackground = new GUIStyle(GUI.skin.box);
                selectedItemBackground.normal.background =
                    Texture2DExtensions.MakeTexture(1, 1, new Color(0.57f, 0.78f, 0.96f, 1f));
            }
        }