示例#1
0
        public static void IconDataField(Rect uiRect, AtlasIcon icon, string value, GUIStyle dataStyle)
        {
            Color color = GUI.color;

            IconDataField(uiRect, icon, value, dataStyle, color);
            GUI.color = color;
        }
示例#2
0
        // Get any icon, given its name
        public AtlasIcon GetIcon(string name)
        {
            AtlasIcon icon = iconList.First().Value;

            iconList.TryGetValue(name, out icon);
            return(icon);
        }
示例#3
0
        public static void IconDataField(Rect uiRect, AtlasIcon icon, string value, GUIStyle dataStyle, Color color)
        {
            Color oldColor = GUI.color;

            GUI.color = color;
            GUI.BeginGroup(uiRect);
            Rect iconRect = new Rect(0, 0, uiRect.height, uiRect.height);
            Rect dataRect = new Rect(0, 0, uiRect.width, uiRect.height);

            GUI.DrawTextureWithTexCoords(iconRect, icon.iconAtlas, icon.iconRect);
            GUI.Label(dataRect, value, dataStyle);
            GUI.EndGroup();
            GUI.color = oldColor;
        }