public static BuildGUIStyleForLabel ( Color color, int fontSize, bool wrapText, FontStyle fontstyle, TextAnchor anchor ) : |
||
color | Color | |
fontSize | int | |
wrapText | bool | |
fontstyle | FontStyle | |
anchor | TextAnchor | |
return |
public static GUIStyle BuildGUIStyleForLabel(Color color, int fontSize, bool wrapText, FontStyle fontstyle, TextAnchor anchor)
{
GUIStyle style = new GUIStyle();
style.focused.background = style.onNormal.background;
style.focused.textColor = color;
style.alignment = anchor;
style.fontSize = fontSize;
style.fontStyle = fontstyle;
style.wordWrap = wrapText;
style.clipping = TextClipping.Clip;
style.normal.textColor = color;
style.padding = new RectOffset(4, 4, 4, 4);
return style;
}