示例#1
0
        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);
        }
示例#2
0
        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;
        }