internal static string GetStatusString(AssetStatus assetStatus) { if (ClassifyAssetStatus.IsPrivate(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.Private)); } if (ClassifyAssetStatus.IsIgnored(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusIgnored)); } if (ClassifyAssetStatus.IsAdded(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusAdded)); } if (ClassifyAssetStatus.IsConflicted(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusConflicted)); } if (ClassifyAssetStatus.IsDeletedOnServer(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusDeletedOnServer)); } if (ClassifyAssetStatus.IsLockedRemote(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusLockedRemote)); } if (ClassifyAssetStatus.IsOutOfDate(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusOutOfDate)); } if (ClassifyAssetStatus.IsLocked(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusLockedMe)); } if (ClassifyAssetStatus.IsCheckedOut(assetStatus)) { return(PlasticLocalization.GetString( PlasticLocalization.Name.StatusCheckout)); } return(string.Empty); }
internal static Texture GetOverlayIcon(AssetStatus assetStatus) { if (ClassifyAssetStatus.IsPrivate(assetStatus)) { return(Images.GetPrivatedOverlayIcon()); } if (ClassifyAssetStatus.IsIgnored(assetStatus)) { return(Images.GetIgnoredOverlayIcon()); } if (ClassifyAssetStatus.IsAdded(assetStatus)) { return(Images.GetAddedOverlayIcon()); } if (ClassifyAssetStatus.IsConflicted(assetStatus)) { return(Images.GetConflictedOverlayIcon()); } if (ClassifyAssetStatus.IsDeletedOnServer(assetStatus)) { return(Images.GetDeletedRemoteOverlayIcon()); } if (ClassifyAssetStatus.IsLockedRemote(assetStatus)) { return(Images.GetLockedRemoteOverlayIcon()); } if (ClassifyAssetStatus.IsOutOfDate(assetStatus)) { return(Images.GetOutOfSyncOverlayIcon()); } if (ClassifyAssetStatus.IsLocked(assetStatus)) { return(Images.GetLockedLocalOverlayIcon()); } if (ClassifyAssetStatus.IsCheckedOut(assetStatus)) { return(Images.GetCheckedOutOverlayIcon()); } return(null); }
static void OnProjectWindowItemGUI(string guid, Rect selectionRect) { if (string.IsNullOrEmpty(guid)) { return; } if (Event.current.type != EventType.Repaint) { return; } AssetStatus statusesToDraw = GetStatusesToDraw( mAssetStatusCache.GetStatusForGuid(guid)); foreach (AssetStatus status in Enum.GetValues(typeof(AssetStatus))) { if (status == AssetStatus.None) { continue; } if (!statusesToDraw.HasFlag(status)) { continue; } LockStatusData lockStatusData = ClassifyAssetStatus.IsLockedRemote(status) ? mAssetStatusCache.GetLockStatusData(guid) : null; string tooltipText = GetTooltipText( status, lockStatusData); DrawOverlayIcon.ForStatus( selectionRect, status, tooltipText); } }