public PackageToolBarError(PackageDatabase packageDatabase)
        {
            ResolveDependencies(packageDatabase);

            m_ErrorStatus = new Label {
                name = "state"
            };
            m_ErrorStatus.AddToClassList("status");
            Add(m_ErrorStatus);

            m_ErrorMessage = new Label {
                name = "message"
            };
            m_ErrorMessage.AddToClassList("errorMessage");
            m_ErrorMessage.ShowTextTooltipOnSizeChange();
            Add(m_ErrorMessage);

            m_OkButton = new Button {
                name = "okButton", text = L10n.Tr("Ok")
            };
            m_OkButton.clickable.clicked += OnOkClicked;
            Add(m_OkButton);
        }
Beispiel #2
0
 protected void ResolveDependencies(PackageDatabase packageDatabase)
 {
     m_PackageDatabase = packageDatabase;
 }
        public AddPackageByNameDropdown(ResourceLoader resourceLoader, PackageFiltering packageFiltering, UpmClient upmClient, PackageDatabase packageDatabase, PageManager packageManager, EditorWindow anchorWindow)
        {
            ResolveDependencies(resourceLoader, packageFiltering, upmClient, packageDatabase, packageManager);

            styleSheets.Add(m_ResourceLoader.inputDropdownStyleSheet);

            var root = m_ResourceLoader.GetTemplate("AddPackageByNameDropdown.uxml");

            Add(root);
            cache = new VisualElementCache(root);

            Init(anchorWindow);
        }
 private void ResolveDependencies(ResourceLoader resourceLoader, PackageFiltering packageFiltering, UpmClient upmClient, PackageDatabase packageDatabase, PageManager packageManager)
 {
     m_ResourceLoader   = resourceLoader;
     m_PackageFiltering = packageFiltering;
     m_UpmClient        = upmClient;
     m_PackageDatabase  = packageDatabase;
     m_PageManager      = packageManager;
 }
Beispiel #5
0
 public InstallFoldoutGroup(ApplicationProxy applicationProxy, PackageDatabase packageDatabase)
     : base(new PackageAddButton(applicationProxy, packageDatabase), null)
 {
 }
 public PackageAddButton(ApplicationProxy applicationProxy,
                         PackageDatabase packageDatabase)
 {
     m_Application     = applicationProxy;
     m_PackageDatabase = packageDatabase;
 }
Beispiel #7
0
 public PackageCancelDownloadButton(AssetStoreDownloadManager assetStoreDownloadManager, PackageDatabase packageDatabase)
 {
     m_AssetStoreDownloadManager = assetStoreDownloadManager;
     m_PackageDatabase           = packageDatabase;
 }
 private void ResolveDependencies(PackageDatabase packageDatabase)
 {
     m_PackageDatabase = packageDatabase;
 }
 public PackageItem(ResourceLoader resourceLoader, PageManager pageManager, PackageManagerProjectSettingsProxy settingsProxy, PackageDatabase packageDatabase)
 {
     m_ResourceLoader  = resourceLoader;
     m_PageManager     = pageManager;
     m_SettingsProxy   = settingsProxy;
     m_PackageDatabase = packageDatabase;
 }
Beispiel #10
0
 public PackageDownloadButton(AssetStoreDownloadManager assetStoreDownloadManager, AssetStoreCache assetStoreCache, PackageDatabase packageDatabase)
 {
     m_AssetStoreDownloadManager = assetStoreDownloadManager;
     m_AssetStoreCache           = assetStoreCache;
     m_PackageDatabase           = packageDatabase;
 }
Beispiel #11
0
        public PackageGroup(ResourceLoader resourceLoader, PageManager pageManager, PackageManagerProjectSettingsProxy settingsProxy, PackageDatabase packageDatabase, string groupName, string displayName, bool expanded = true, bool hidden = false)
        {
            ResolveDependencies(resourceLoader, pageManager, settingsProxy, packageDatabase);

            name = groupName;
            var root = m_ResourceLoader.GetTemplate("PackageGroup.uxml");

            Add(root);
            m_Cache = new VisualElementCache(root);

            headerCaret.SetValueWithoutNotify(expanded);
            EnableInClassList("collapsed", !expanded);
            headerCaret.RegisterValueChangedCallback((evt) =>
            {
                m_PageManager.SetGroupExpanded(groupName, evt.newValue);
                EnableInClassList("collapsed", !evt.newValue);
                EditorApplication.delayCall += () => onGroupToggle?.Invoke(evt.newValue);
            });

            headerTag.pickingMode = PickingMode.Ignore;
            headerCaret.text      = displayName;

            isHidden = hidden;
            if (isHidden)
            {
                AddToClassList("hidden");
            }
        }
Beispiel #12
0
 private void ResolveDependencies(ResourceLoader resourceLoader, PageManager pageManager, PackageManagerProjectSettingsProxy settingsProxy, PackageDatabase packageDatabase)
 {
     m_ResourceLoader  = resourceLoader;
     m_PageManager     = pageManager;
     m_SettingsProxy   = settingsProxy;
     m_PackageDatabase = packageDatabase;
 }
 public PackageCancelDownloadButton(AssetStoreDownloadManager assetStoreDownloadManager, PackageDatabase packageDatabase, bool isIconButton = false)
 {
     m_AssetStoreDownloadManager = assetStoreDownloadManager;
     m_PackageDatabase           = packageDatabase;
     m_IsIconButton = isIconButton;
     if (isIconButton)
     {
         element.AddToClassList("cancelIcon");
         element.AddToClassList("icon");
     }
 }
Beispiel #14
0
        public PackageDowngradeButton(AssetStoreDownloadManager assetStoreDownloadManager, AssetStoreCache assetStoreCache, PackageDatabase packageDatabase)
        {
            m_AssetStoreDownloadManager = assetStoreDownloadManager;
            m_AssetStoreCache           = assetStoreCache;
            m_PackageDatabase           = packageDatabase;

            m_Element.SetIcon("warning");
        }
Beispiel #15
0
 public PackageItem(PageManager pageManager, PackageManagerProjectSettingsProxy settingsProxy, PackageDatabase packageDatabase)
 {
     ResolveDependencies(pageManager, settingsProxy, packageDatabase);
 }