Beispiel #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;
        }
Beispiel #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);
        }
Beispiel #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;
        }