private void RefreshLockIcons(IEnumerable <IPackageVersion> featureSets, VisualState visualState = null)
        {
            var showLockedIcon = featureSets?.Any() == true;

            if (showLockedIcon)
            {
                visualState = visualState ?? m_PageManager.GetVisualState(m_Package);
                if (visualState?.isLocked == true)
                {
                    lockedIcon.RemoveFromClassList("unlocked");
                    lockedIcon.AddToClassList("locked");
                    lockedIcon.tooltip = L10n.Tr("This package is locked because it's part of a feature set. Click unlock button to be able to make changes");
                }
                else
                {
                    lockedIcon.AddToClassList("unlocked");
                    lockedIcon.RemoveFromClassList("locked");
                    lockedIcon.tooltip = L10n.Tr("This package is unlocked. You can now change its version.");
                }
            }
            UIUtils.SetElementDisplay(lockedIcon, showLockedIcon);
        }
Example #2
0
        public virtual bool SelectTab(T tabToSelect)
        {
            if (tabToSelect is null || !m_HeaderButtons.ContainsKey(tabToSelect.id) || tabToSelect.id == selectedTabId)
            {
                return(false);
            }

            var previousSelectedTab = GetTab(selectedTabId);

            if (previousSelectedTab != null)
            {
                m_HeaderButtons[previousSelectedTab.id].RemoveFromClassList("tabHeaderSelected");
                UIUtils.SetElementDisplay(previousSelectedTab, false);
            }

            m_HeaderButtons[tabToSelect.id].AddClasses("tabHeaderSelected");
            UIUtils.SetElementDisplay(tabToSelect, true);
            m_SelectedTabId = tabToSelect.id;

            onTabSwitched.Invoke(previousSelectedTab, tabToSelect);
            return(true);
        }
        public void Refresh(IPackage package, IPackageVersion version)
        {
            m_Package = package;
            m_Version = version;

            detailTitle.SetValueWithoutNotify(m_Version.displayName);
            detailsLinks.Refresh(m_Package, m_Version);

            UIUtils.SetElementDisplay(disabledWarningBox, version.HasTag(PackageTag.Disabled));

            RefreshName();
            RefreshDependency();
            RefreshFeatureSetElements();
            RefreshAuthor();
            RefreshTags();
            RefreshVersionLabel();
            RefreshVersionInfoIcon();
            RefreshRegistry();
            RefreshEntitlement();
            RefreshEmbeddedFeatureSetWarningBox();
            RefreshHiddenAssetInfo();
        }
        private void Init(EditorWindow anchorWindow, InputDropdownArgs args)
        {
            m_AnchorWindow = anchorWindow;

            m_WindowSize = args.windowSize ?? k_DefaultWindowSize;

            inputTextField.value = args.defaultValue ?? string.Empty;
            inputTextField.RegisterCallback <ChangeEvent <string> >(OnTextFieldChange);
            inputTextField.RegisterCallback <KeyDownEvent>(OnKeyDownShortcut);

            m_InputPlaceholder      = new TextFieldPlaceholder(inputTextField);
            m_InputPlaceholder.text = args.placeholderText ?? string.Empty;

            mainTitle.text = args.title ?? string.Empty;
            UIUtils.SetElementDisplay(mainTitle, !string.IsNullOrEmpty(mainTitle.text));

            var showIcon = false;

            if (!string.IsNullOrEmpty(args.iconUssClass))
            {
                showIcon = true;
                icon.AddToClassList(args.iconUssClass);
            }
            else if (args.icon != null)
            {
                showIcon = true;
                icon.style.backgroundImage = new StyleBackground((Background)args.icon);
            }
            UIUtils.SetElementDisplay(icon, showIcon);

            submitButton.clickable.clicked += SubmitClicked;
            submitButton.SetEnabled(!string.IsNullOrWhiteSpace(inputTextField.value));
            submitButton.text = !string.IsNullOrEmpty(args.submitButtonText) ? args.submitButtonText : k_DefaultSubmitButtonText;
            if (args.onInputSubmitted != null)
            {
                submitClicked = args.onInputSubmitted;
            }
        }
        private void Refresh(IPage page = null)
        {
            if (page == null)
            {
                page = m_PageManager.GetCurrentPage();
            }
            var showOnFilterTab = page.subPages.Skip(1).Any();

            UIUtils.SetElementDisplay(this, showOnFilterTab);

            if (!showOnFilterTab)
            {
                return;
            }

            Clear();
            var currentSubPage = page.currentSubPage;

            foreach (var subPage in page.subPages)
            {
                var button = new Button();
                button.text = subPage.displayName;
                button.clickable.clicked += () =>
                {
                    if (page.currentSubPage == subPage)
                    {
                        return;
                    }
                    page.currentSubPage = subPage;
                    PackageManagerWindowAnalytics.SendEvent("changeSubPage");
                };
                Add(button);
                if (subPage == currentSubPage)
                {
                    button.AddToClassList("active");
                }
            }
        }
        public void Refresh(IPackageVersion version)
        {
            UIUtils.SetElementDisplay(this, false);

            if (version?.packageInfo == null)
            {
                return;
            }

            var upmReserved   = m_UpmCache.ParseUpmReserved(version?.packageInfo);
            var platformNames = upmReserved?.GetList <string>("supportedPlatforms") ?? Enumerable.Empty <string>();

            if (!platformNames.Any())
            {
                return;
            }

            UIUtils.SetElementDisplay(this, true);

            var listLabel = platformNames.Count() > 1 ? L10n.Tr("Supported Platforms:") : L10n.Tr("Supported Platform:");

            m_TagLabelList.Refresh(listLabel, platformNames);
        }
        public PackageDependencySampleItemLowWidth(ResourceLoader resourceLoader, string name, string version, Label installStatus)
        {
            var root = resourceLoader.GetTemplate("PackageDependencySampleItemLowWidth.uxml");

            Add(root);

            cache = new VisualElementCache(root);

            itemName.text    = name;
            itemName.tooltip = name;

            itemSizeOrVersion.value   = version;
            itemSizeOrVersion.tooltip = version;
            if (version == "---")
            {
                UIUtils.SetElementDisplay(itemSizeOrVersion, false);
            }

            if (installStatus != null && !string.IsNullOrEmpty(installStatus.text))
            {
                item.Add(installStatus);
            }
        }
Example #8
0
        private void RefreshRegistry()
        {
            var registry     = m_Version.registry;
            var showRegistry = registry != null;

            UIUtils.SetElementDisplay(detailRegistryContainer, showRegistry);
            if (showRegistry)
            {
                scopedRegistryInfoBox.text = k_InfoBoxReadMoreText[(int)InfoBoxState.ScopedRegistry];
                UIUtils.SetElementDisplay(scopedRegistryInfoBox, !registry.isDefault);
                if (!m_Version.packageInfo.versions.all.Any())
                {
                    detailRegistryName.text    = L10n.Tr("Unknown");
                    detailRegistryName.tooltip = string.Empty;
                }
                else
                {
                    detailRegistryName.text    = registry.isDefault ? "Unity" : registry.name;
                    detailRegistryName.tooltip = registry.url;
                }
            }
            if (m_Version.HasTag(PackageTag.Experimental))
            {
                scopedRegistryInfoBox.text = k_InfoBoxReadMoreText[(int)InfoBoxState.Experimental];
                UIUtils.SetElementDisplay(scopedRegistryInfoBox, true);
            }
            else if (m_Version.HasTag(PackageTag.PreRelease))
            {
                scopedRegistryInfoBox.text = k_InfoBoxReadMoreText[(int)InfoBoxState.PreRelease];
                UIUtils.SetElementDisplay(scopedRegistryInfoBox, true);
            }
            else if (m_Version.HasTag(PackageTag.ReleaseCandidate))
            {
                scopedRegistryInfoBox.text = k_InfoBoxReadMoreText[(int)InfoBoxState.ReleaseCandidate];
                UIUtils.SetElementDisplay(scopedRegistryInfoBox, true);
            }
        }
Example #9
0
        private void UpdateOrdering(IPage page)
        {
            orderingMenu.menu.MenuItems().Clear();

            var shouldDisplayOrdering = page?.capability.orderingValues?.Any() ?? false;

            if (!shouldDisplayOrdering)
            {
                UIUtils.SetElementDisplay(orderingMenu, false);
                return;
            }

            UIUtils.SetElementDisplay(orderingMenu, true);

            var matchCurrentFilter = false;

            if (shouldDisplayOrdering)
            {
                foreach (var ordering in page.capability.orderingValues)
                {
                    matchCurrentFilter |= AddOrdering(page, ordering);
                }
            }

            if (!matchCurrentFilter)
            {
                var filters       = page.filters?.Clone();
                var firstOrdering = page.capability?.orderingValues?.FirstOrDefault();
                if (filters != null && firstOrdering != null)
                {
                    orderingMenu.text      = $"Sort: {L10n.Tr(firstOrdering.displayName)}";
                    filters.orderBy        = firstOrdering.orderBy;
                    filters.isReverseOrder = firstOrdering.order == PageCapability.Order.Descending;
                    page.UpdateFilters(filters);
                }
            }
        }
        public PackageDependencySampleItemLowWidth(IPackageVersion version, Sample sample)
        {
            ResolveDependencies();
            var root = m_ResourceLoader.GetTemplate("PackageDependencySampleItemLowWidth.uxml");

            Add(root);

            cache = new VisualElementCache(root);

            var sampleItem = new PackageSampleItem(version, sample);

            sampleItem.importButton.SetEnabled(version.isInstalled);

            var name        = sampleItem.nameLabel.text;
            var size        = sampleItem.sizeLabel.text;
            var description = sampleItem.descriptionLabel.text;

            itemName.text    = name;
            itemName.tooltip = name;

            sampleStatus.Add(sampleItem.importStatus);

            itemSizeOrVersion.value   = size;
            itemSizeOrVersion.tooltip = size;

            importButtonContainer.Add(sampleItem.importButton);

            if (!string.IsNullOrEmpty(description))
            {
                UIUtils.SetElementDisplay(sampleDescription, true);
                sampleDescription.SetValueWithoutNotify(description);
            }
            else
            {
                UIUtils.SetElementDisplay(sampleDescription, false);
            }
        }
        public PackageDependencySampleItemLowWidth(ResourceLoader resourceLoader, IPackageVersion version, Sample sample, SelectionProxy selection, AssetDatabaseProxy assetDatabase, ApplicationProxy application, IOProxy iOProxy)
        {
            var root = resourceLoader.GetTemplate("PackageDependencySampleItemLowWidth.uxml");

            Add(root);

            cache = new VisualElementCache(root);

            var sampleItem = new PackageDetailsSampleItem(version, sample, selection, assetDatabase, application, iOProxy);

            sampleItem.importButton.SetEnabled(version.isInstalled);

            var name        = sampleItem.nameLabel.text;
            var size        = sampleItem.sizeLabel.text;
            var description = sampleItem.descriptionLabel.text;

            itemName.text    = name;
            itemName.tooltip = name;

            sampleStatus.Add(sampleItem.importStatus);

            itemSizeOrVersion.value   = size;
            itemSizeOrVersion.tooltip = size;

            importButtonContainer.Add(sampleItem.importButton);

            if (!string.IsNullOrEmpty(description))
            {
                UIUtils.SetElementDisplay(sampleDescription, true);
                sampleDescription.SetValueWithoutNotify(description);
            }
            else
            {
                UIUtils.SetElementDisplay(sampleDescription, false);
            }
        }
Example #12
0
        public void SetError(UIError error, IPackageVersion packageVersion = null)
        {
            var message = string.Empty;

            if (!string.IsNullOrEmpty(error.message))
            {
                message = error.message;
            }
            if (error.HasAttribute(UIError.Attribute.IsDetailInConsole))
            {
                message = string.Format(L10n.Tr("{0} See console for more details."), message);
            }

            if (error.HasAttribute(UIError.Attribute.IsWarning))
            {
                alertContainer.RemoveFromClassList("error");
                alertContainer.AddClasses("warning");
            }
            else
            {
                alertContainer.RemoveFromClassList("warning");
                alertContainer.AddClasses("error");
            }

            if (!string.IsNullOrEmpty(error.readMoreURL))
            {
                ShowReadMoreLink(error, packageVersion);
            }
            else
            {
                HideReadMoreLink();
            }

            alertMessage.text = message;
            UIUtils.SetElementDisplay(this, true);
        }
Example #13
0
        private bool RefreshSizeInfo()
        {
            var showSizes = m_Version.sizes.Any();

            UIUtils.SetElementDisplay(detailSizesContainer, showSizes);
            detailSizes.Clear();

            var sizeInfo = m_Version.sizes.FirstOrDefault(info => info.supportedUnityVersion == m_Version.supportedVersion);

            if (sizeInfo == null)
            {
                sizeInfo = m_Version.sizes.LastOrDefault();
            }

            if (sizeInfo != null)
            {
                var label = new SelectableLabel();
                label.style.whiteSpace = WhiteSpace.Normal;
                label.SetValueWithoutNotify(string.Format(L10n.Tr("Size: {0} (Number of files: {1})"), UIUtils.ConvertToHumanReadableSize(sizeInfo.downloadSize), sizeInfo.assetCount));
                detailSizes.Add(label);
            }

            return(showSizes);
        }
        private void ImagesGeometryChangeEvent(GeometryChangedEvent evt)
        {
            // hide or show the last image depending on whether it fits on the screen
            var images        = m_ImagesContainer.Children();
            var visibleImages = images.Where(elem => UIUtils.IsElementVisible(elem));

            var firstInvisibleImage = images.FirstOrDefault(elem => !UIUtils.IsElementVisible(elem));
            var visibleImagesWidth  = visibleImages.Sum(elem => elem.rect.width);
            var lastVisibleImage    = visibleImages.LastOrDefault();

            var widthWhenLastImageRemoved = m_WidthsWhenImagesRemoved.Any() ? m_WidthsWhenImagesRemoved.Peek() : float.MaxValue;

            // if the container approximately doubles in height, that indicates the last image was wrapped around to another row
            if (lastVisibleImage != null && (evt.newRect.height >= 2 * lastVisibleImage.rect.height || visibleImagesWidth >= evt.newRect.width))
            {
                UIUtils.SetElementDisplay(lastVisibleImage, false);
                m_WidthsWhenImagesRemoved.Push(evt.newRect.width);
            }
            else if (firstInvisibleImage != null && evt.newRect.width > widthWhenLastImageRemoved)
            {
                UIUtils.SetElementDisplay(firstInvisibleImage, true);
                m_WidthsWhenImagesRemoved.Pop();
            }
        }
Example #15
0
 private void SetupOrdering()
 {
     orderingMenu.menu.MenuItems().Clear();
     orderingMenu.ShowTextTooltipOnSizeChange(-16);
     UIUtils.SetElementDisplay(orderingMenu, false);
 }
Example #16
0
 private void RefreshEmbeddedFeatureSetWarningBox()
 {
     UIUtils.SetElementDisplay(embeddedFeatureSetWarningBox, m_Package.Is(PackageType.Feature) && m_Version.HasTag(PackageTag.Custom));
 }
 internal void UpdateLockedUI(bool showLock)
 {
     UIUtils.SetElementDisplay(m_LockedIcon, showLock);
 }
Example #18
0
        private void RefreshVersionInfoIcon()
        {
            var installed = m_Package?.versions?.installed;

            if (installed == null || m_Version == null)
            {
                UIUtils.SetElementDisplay(versionInfoIcon, false);
                return;
            }

            var installedVersionString = installed.versionString;

            if (installed.IsDifferentVersionThanRequested)
            {
                UIUtils.SetElementDisplay(versionInfoIcon, true);

                if (m_Version.IsRequestedButOverriddenVersion)
                {
                    versionInfoIcon.tooltip = string.Format(L10n.Tr("Unity installed version {0} because another package depends on it (version {0} overrides version {1})."),
                                                            installedVersionString, m_Version.versionString);
                }
                else if (m_Version.isInstalled)
                {
                    versionInfoIcon.tooltip = L10n.Tr("At least one other package depends on this version of the package.");
                }
                else
                {
                    versionInfoIcon.tooltip = string.Format(L10n.Tr("At least one other package depends on version {0} of this package."), installedVersionString);
                }
                return;
            }

            // In Lifecycle V2, if a Unity package doesn't have a lifecycle version (listed in the editor manifest),
            // then that package is not considered part of the Unity Editor "product" and we need to let users know.
            var unityVersionString = m_Application.unityVersion;

            if (!m_Package.versions.hasLifecycleVersion && m_Package.Is(PackageType.Unity))
            {
                UIUtils.SetElementDisplay(versionInfoIcon, true);
                versionInfoIcon.tooltip = string.Format(L10n.Tr("This package is not officially supported for Unity {0}."), unityVersionString);
                return;
            }

            // We want to let users know when they are using a version different than the recommended.
            // The recommended version is the resolvedLifecycleVersion or the resolvedLifecycleNextVersion.
            // However, we don't want to show the info icon if the version currently installed
            // is a higher patch version of the one in the editor manifest (still considered verified).
            var recommended = m_Package.versions.recommended;

            if (m_Version.isInstalled &&
                m_Package.state != PackageState.InstalledAsDependency &&
                m_Package.Is(PackageType.Unity) &&
                recommended != null &&
                installed.version?.IsEqualOrPatchOf(recommended.version) != true)
            {
                UIUtils.SetElementDisplay(versionInfoIcon, true);
                versionInfoIcon.tooltip = string.Format(L10n.Tr("This version is not verified for Unity {0}. We recommended using {1}."),
                                                        unityVersionString, recommended.versionString);
                return;
            }

            UIUtils.SetElementDisplay(versionInfoIcon, false);
        }
Example #19
0
        private void RefreshHiddenAssetInfo()
        {
            bool showHiddenInfoBox = m_Package is AssetStorePackage && (m_Package as AssetStorePackage).isHidden;

            UIUtils.SetElementDisplay(hiddenAssetInfoBoxContainer, showHiddenInfoBox);
        }
Example #20
0
        public PackageManagerProjectSettingsProvider(string path, SettingsScope scopes, IEnumerable <string> keywords = null)
            : base(path, scopes, keywords)
        {
            activateHandler = (s, element) =>
            {
                ResolveDependencies();

                // Create a child to make sure all the style sheets are not added to the root.
                rootVisualElement = new ScrollView();
                rootVisualElement.StretchToParentSize();
                rootVisualElement.AddStyleSheetPath(StylesheetPath.scopedRegistriesSettings);
                rootVisualElement.AddStyleSheetPath(StylesheetPath.projectSettings);
                rootVisualElement.AddStyleSheetPath(EditorGUIUtility.isProSkin ? StylesheetPath.stylesheetDark : StylesheetPath.stylesheetLight);
                rootVisualElement.AddStyleSheetPath(StylesheetPath.stylesheetCommon);
                rootVisualElement.styleSheets.Add(m_ResourceLoader.packageManagerCommonStyleSheet);

                element.Add(rootVisualElement);

                m_GeneralTemplate = EditorGUIUtility.Load(k_GeneralServicesTemplatePath) as VisualTreeAsset;

                VisualElement newVisualElement = new VisualElement();
                m_GeneralTemplate.CloneTree(newVisualElement);
                rootVisualElement.Add(newVisualElement);

                cache = new VisualElementCache(rootVisualElement);

                advancedSettingsFoldout.SetValueWithoutNotify(m_SettingsProxy.advancedSettingsExpanded);
                m_SettingsProxy.onAdvancedSettingsFoldoutChanged += OnAdvancedSettingsFoldoutChanged;
                advancedSettingsFoldout.RegisterValueChangedCallback(changeEvent =>
                {
                    if (changeEvent.target == advancedSettingsFoldout)
                    {
                        m_SettingsProxy.advancedSettingsExpanded = changeEvent.newValue;
                    }
                });

                scopedRegistriesSettingsFoldout.SetValueWithoutNotify(m_SettingsProxy.scopedRegistriesSettingsExpanded);
                m_SettingsProxy.onScopedRegistriesSettingsFoldoutChanged += OnScopedRegistriesSettingsFoldoutChanged;
                scopedRegistriesSettingsFoldout.RegisterValueChangedCallback(changeEvent =>
                {
                    if (changeEvent.target == scopedRegistriesSettingsFoldout)
                    {
                        m_SettingsProxy.scopedRegistriesSettingsExpanded = changeEvent.newValue;
                    }
                });

                preReleaseInfoBox.Q <Button>().clickable.clicked += () =>
                {
                    m_ApplicationProxy.OpenURL($"https://docs.unity3d.com/{m_ApplicationProxy.shortUnityVersion}/Documentation/Manual/pack-preview.html");
                };

                enablePreReleasePackages.SetValueWithoutNotify(m_SettingsProxy.enablePreReleasePackages);
                enablePreReleasePackages.RegisterValueChangedCallback(changeEvent =>
                {
                    var newValue = changeEvent.newValue;

                    if (newValue != m_SettingsProxy.enablePreReleasePackages)
                    {
                        var saveIt = true;
                        if (newValue && !m_SettingsProxy.oneTimeWarningShown)
                        {
                            if (m_ApplicationProxy.DisplayDialog("showPreReleasePackages", L10n.Tr("Show pre-release packages"), k_Message, L10n.Tr("I understand"), L10n.Tr("Cancel")))
                            {
                                m_SettingsProxy.oneTimeWarningShown = true;
                            }
                            else
                            {
                                saveIt = false;
                            }
                        }

                        if (saveIt)
                        {
                            m_SettingsProxy.enablePreReleasePackages = newValue;
                            m_SettingsProxy.Save();
                            PackageManagerWindowAnalytics.SendEvent("togglePreReleasePackages");
                        }
                    }
                    enablePreReleasePackages.SetValueWithoutNotify(m_SettingsProxy.enablePreReleasePackages);
                });

                UIUtils.SetElementDisplay(seeAllPackageVersions, Unsupported.IsDeveloperBuild());
                seeAllPackageVersions.SetValueWithoutNotify(m_SettingsProxy.seeAllPackageVersions);

                seeAllPackageVersions.RegisterValueChangedCallback(changeEvent =>
                {
                    seeAllPackageVersions.SetValueWithoutNotify(changeEvent.newValue);
                    var newValue = changeEvent.newValue;

                    if (newValue != m_SettingsProxy.seeAllPackageVersions)
                    {
                        m_SettingsProxy.seeAllPackageVersions = newValue;
                        m_SettingsProxy.Save();
                    }
                });
            };
        }
 private void StopSpinner()
 {
     m_Spinner?.Stop();
     UIUtils.SetElementDisplay(m_StateIcon, true);
 }
 private void RefreshErrorBox()
 {
     scopedRegistryErrorBox.text = draft.errorMessage;
     UIUtils.SetElementDisplay(scopedRegistryErrorBox, !string.IsNullOrEmpty(scopedRegistryErrorBox.text));
 }
Example #23
0
 public void ClearError()
 {
     UIUtils.SetElementDisplay(this, false);
     alertMessage.text = string.Empty;
     HideReadMoreLink();
 }
        private void BuildMainItem(bool isFeature)
        {
            m_IsFeatureLayout = isFeature;

            m_MainItem = new VisualElement {
                name = "mainItem"
            };
            Add(m_MainItem);

            m_LeftContainer = new VisualElement {
                name = "leftContainer", classList = { "left" }
            };
            m_MainItem.Add(m_LeftContainer);

            m_DependencyIcon = new Label {
                name = "dependencyIcon"
            };
            m_DependencyIcon.tooltip = "Installed as dependency";
            m_LeftContainer.Add(m_DependencyIcon);

            m_LockedIcon = new Label {
                name = "lockedIcon"
            };
            m_LeftContainer.Add(m_LockedIcon);

            m_ExpanderHidden = new Label {
                name = "expanderHidden", classList = { "expanderHidden" }
            };
            m_LeftContainer.Add(m_ExpanderHidden);

            m_NameLabel = new Label {
                name = "packageName", classList = { "name" }
            };
            if (isFeature)
            {
                m_MainItem.AddToClassList("feature");
                m_NumPackagesInFeature = new Label()
                {
                    name = "numPackages"
                };

                var leftMiddleContainer = new VisualElement()
                {
                    name = "leftMiddleContainer"
                };
                leftMiddleContainer.Add(m_NameLabel);
                leftMiddleContainer.Add(m_NumPackagesInFeature);
                m_LeftContainer.Add(leftMiddleContainer);
            }
            else
            {
                m_LeftContainer.Add(m_NameLabel);
            }

            m_EntitlementLabel = new Label {
                name = "entitlementLabel"
            };
            UIUtils.SetElementDisplay(m_EntitlementLabel, false);
            m_LeftContainer.Add(m_EntitlementLabel);

            m_VersionLabel = new Label {
                name = "versionLabel", classList = { "version", "middle" }
            };
            m_MainItem.Add(m_VersionLabel);

            m_RightContainer = new VisualElement {
                name = "rightContainer", classList = { "right" }
            };
            m_MainItem.Add(m_RightContainer);

            m_TagContainer = new VisualElement {
                name = "tagContainer"
            };
            m_RightContainer.Add(m_TagContainer);

            m_Spinner = null;

            m_StateContainer = new VisualElement {
                name = "statesContainer"
            };
            m_MainItem.Add(m_StateContainer);

            m_StateIcon = new VisualElement {
                name = "stateIcon", classList = { "status" }
            };
            m_StateContainer.Add(m_StateIcon);

            if (isFeature)
            {
                m_InfoStateIcon = new VisualElement {
                    name = "versionState"
                };
                m_StateContainer.Add(m_InfoStateIcon);
            }
        }
Example #25
0
 private void DisplayPackagesCacheErrorBox(HelpBoxMessageType type, string message)
 {
     packagesCacheErrorBox.messageType = type;
     packagesCacheErrorBox.text        = message;
     UIUtils.SetElementDisplay(packagesCacheErrorBox, true);
 }
Example #26
0
 private void DisplayAssetsCacheErrorBox(HelpBoxMessageType type, string message)
 {
     assetsCacheErrorBox.messageType = type;
     assetsCacheErrorBox.text        = message;
     UIUtils.SetElementDisplay(assetsCacheErrorBox, true);
 }
Example #27
0
 private void HideReadMoreLink()
 {
     UIUtils.SetElementDisplay(alertReadMoreLink, false);
     m_ReadMoreLinkAction = null;
 }
 private void ClearError()
 {
     UIUtils.SetElementDisplay(this, false);
     tooltip = string.Empty;
     ClearClassList();
 }
 private void ClearError()
 {
     UIUtils.SetElementDisplay(this, false);
     m_ErrorMessage.text = string.Empty;
     m_ErrorStatus.ClearClassList();
 }
Example #30
0
 private void RefreshDependency()
 {
     UIUtils.SetElementDisplay(dependencyContainer, m_Version.isInstalled && !m_Version.isDirectDependency && !m_Version.HasTag(PackageTag.Feature));
 }