예제 #1
0
        private void SetStyles(MenuElement element)
        {
            normalStyle = new GUIStyle();
            normalStyle.normal.textColor = element.fontColor;
            normalStyle.font             = element.font;
            normalStyle.fontSize         = element.GetFontSize();
            normalStyle.alignment        = TextAnchor.MiddleCenter;

            highlightedStyle                   = new GUIStyle();
            highlightedStyle.font              = element.font;
            highlightedStyle.fontSize          = element.GetFontSize();
            highlightedStyle.normal.textColor  = element.fontHighlightColor;
            highlightedStyle.normal.background = element.highlightTexture;
            highlightedStyle.alignment         = TextAnchor.MiddleCenter;
        }
예제 #2
0
		private void SetStyles (MenuElement element)
		{
			normalStyle = new GUIStyle();
			normalStyle.normal.textColor = element.fontColor;
			normalStyle.font = element.font;
			normalStyle.fontSize = element.GetFontSize ();
			normalStyle.alignment = TextAnchor.MiddleCenter;
			
			highlightedStyle = new GUIStyle();
			highlightedStyle.font = element.font;
			highlightedStyle.fontSize = element.GetFontSize ();
			highlightedStyle.normal.textColor = element.fontHighlightColor;
			highlightedStyle.normal.background = element.highlightTexture;
			highlightedStyle.alignment = TextAnchor.MiddleCenter;
		}