示例#1
0
 private void ApplyFont(GUIStyle style, FontProperties fp)
 {
     style.normal.textColor = fp.fontColor;
     style.font             = fp.font;
     style.fontSize         = fp.fontSize;
     style.wordWrap         = true;
 }
示例#2
0
        public GUIStyle GetTextBoxStyle(FontProperties font)
        {
            var style = GUI.skin.textField;

            var fp = font ?? fontProperties;

            if (fp != null)
            {
                ApplyFont(style, fp);
            }

            return(style);
        }
示例#3
0
        public GUIStyle GetMessageBoxStyle(FontProperties fontProperties)
        {
            var style = new GUIStyle();

            if (fontProperties == null)
            {
                style.normal.textColor = Color.white;
            }
            else
            {
                ApplyFont(style, fontProperties);
            }

            return(style);
        }