Exemplo n.º 1
0
        internal static void Initlize()
        {
            EditorApplication.projectWindowItemOnGUI += CustomIcons;

            if (IconStyle == null)
            {
                IconStyle = new GUIStyle
                {
                    imagePosition = ImagePosition.ImageOnly,
                    alignment     = TextAnchor.LowerLeft,
                    padding       = new RectOffset(2, 2, 2, 2)
                };
            }

            if (icons == null)
            {
                icons = new Icons()
                {
                    validIcon          = new GUIContent(GitResourceManager.GetTexture("success")),
                    validIconSmall     = new GUIContent(GitResourceManager.GetTexture("success_small")),
                    modifiedIcon       = new GUIContent(GitResourceManager.GetTexture("error")),
                    modifiedIconSmall  = new GUIContent(GitResourceManager.GetTexture("error_small")),
                    addedIcon          = new GUIContent(GitResourceManager.GetTexture("add")),
                    addedIconSmall     = new GUIContent(GitResourceManager.GetTexture("add_small")),
                    untrackedIcon      = new GUIContent(GitResourceManager.GetTexture("info")),
                    untrackedIconSmall = new GUIContent(GitResourceManager.GetTexture("info_small")),
                    ignoredIcon        = new GUIContent(GitResourceManager.GetTexture("minus")),
                    ignoredIconSmall   = new GUIContent(GitResourceManager.GetTexture("minus_small")),
                    conflictIcon       = new GUIContent(GitResourceManager.GetTexture("warning")),
                    conflictIconSmall  = new GUIContent(GitResourceManager.GetTexture("warning_small")),
                    deletedIcon        = new GUIContent(GitResourceManager.GetTexture("deleted")),
                    deletedIconSmall   = new GUIContent(GitResourceManager.GetTexture("deleted_small")),
                    renamedIcon        = new GUIContent(GitResourceManager.GetTexture("renamed")),
                    renamedIconSmall   = new GUIContent(GitResourceManager.GetTexture("renamed_small")),
                    loadingIconSmall   = new GUIContent(GitResourceManager.GetTexture("loading")),
                    objectIcon         = new GUIContent(GitResourceManager.GetTexture("object")),
                    objectIconSmall    = new GUIContent(GitResourceManager.GetTexture("object_small")),
                    metaIcon           = new GUIContent(GitResourceManager.GetTexture("meta")),
                    metaIconSmall      = new GUIContent(GitResourceManager.GetTexture("meta_small")),
                    fetch         = new GUIContent(GitResourceManager.GetTexture("GitFetch")),
                    merge         = new GUIContent(GitResourceManager.GetTexture("GitMerge")),
                    checkout      = new GUIContent(GitResourceManager.GetTexture("GitCheckout")),
                    loadingCircle = new GUIContent(GitResourceManager.GetTexture("loading_circle")),
                    stashIcon     = new GUIContent(GitResourceManager.GetTexture("stash")),
                    unstashIcon   = new GUIContent(GitResourceManager.GetTexture("unstash")),
                };
            }
        }
Exemplo n.º 2
0
 internal static void Initlize()
 {
     if (icons == null)
     {
         icons = new Icons()
         {
             validIcon          = new GUIContent(GitResourceManager.GetTexture("success")),
             validIconSmall     = new GUIContent(GitResourceManager.GetTexture("success_small")),
             modifiedIcon       = new GUIContent(GitResourceManager.GetTexture("error")),
             modifiedIconSmall  = new GUIContent(GitResourceManager.GetTexture("error_small")),
             addedIcon          = new GUIContent(GitResourceManager.GetTexture("add")),
             addedIconSmall     = new GUIContent(GitResourceManager.GetTexture("add_small")),
             untrackedIcon      = new GUIContent(GitResourceManager.GetTexture("info")),
             untrackedIconSmall = new GUIContent(GitResourceManager.GetTexture("info_small")),
             ignoredIcon        = new GUIContent(GitResourceManager.GetTexture("minus")),
             ignoredIconSmall   = new GUIContent(GitResourceManager.GetTexture("minus_small")),
             conflictIcon       = new GUIContent(GitResourceManager.GetTexture("warning")),
             conflictIconSmall  = new GUIContent(GitResourceManager.GetTexture("warning_small")),
             deletedIcon        = new GUIContent(GitResourceManager.GetTexture("deleted")),
             deletedIconSmall   = new GUIContent(GitResourceManager.GetTexture("deleted_small")),
             renamedIcon        = new GUIContent(GitResourceManager.GetTexture("renamed")),
             renamedIconSmall   = new GUIContent(GitResourceManager.GetTexture("renamed_small")),
             loadingIconSmall   = new GUIContent(GitResourceManager.GetTexture("loading")),
             objectIcon         = new GUIContent(GitResourceManager.GetTexture("object")),
             objectIconSmall    = new GUIContent(GitResourceManager.GetTexture("object_small")),
             metaIcon           = new GUIContent(GitResourceManager.GetTexture("meta")),
             metaIconSmall      = new GUIContent(GitResourceManager.GetTexture("meta_small")),
             fetch              = new GUIContent(GitResourceManager.GetTexture("GitFetch")),
             merge              = new GUIContent(GitResourceManager.GetTexture("GitMerge")),
             checkout           = new GUIContent(GitResourceManager.GetTexture("GitCheckout")),
             loadingCircle      = new GUIContent(GitResourceManager.GetTexture("loading_circle")),
             stashIcon          = new GUIContent(GitResourceManager.GetTexture("stash")),
             unstashIcon        = new GUIContent(GitResourceManager.GetTexture("unstash")),
             lfsObjectIcon      = new GUIContent(GitResourceManager.GetTexture("lfs_object")),
             lfsObjectIconSmall = new GUIContent(GitResourceManager.GetTexture("lfs_object_small")),
             donateSmall        = new GUIContent(GitResourceManager.GetTexture("donate"), "Donate"),
             starSmall          = new GUIContent(GitResourceManager.GetTexture("star")),
         };
     }
 }