public static GUIStyle ColoredBox(Color boxColor, int border = 1, float alphaFalloff = 1f) { var boxSettings = new ColoredBoxSettings(boxColor, border, alphaFalloff); GUIStyle style; if (!boxStyles.TryGetValue(boxSettings, out style)) { style = new GUIStyle("box"); style.normal.background = Box(boxColor, border, alphaFalloff); boxStyles[boxSettings] = style; } return(style); }
public static GUIStyle ColoredBox(Color boxColor, int border = 1, float alphaFalloff = 1f) { var boxSettings = new ColoredBoxSettings(boxColor, border, alphaFalloff); GUIStyle style; if (!boxStyles.TryGetValue(boxSettings, out style)) { style = new GUIStyle("box"); style.normal.background = Box(boxColor, border, alphaFalloff); boxStyles[boxSettings] = style; } return style; }