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);
        }
Ejemplo n.º 2
0
        public static string GetFilterNameWithSubPage(PackageFiltering packageFiltering, PageManager pageManager)
        {
            var filterName = packageFiltering.currentFilterTab.ToString();
            var page       = pageManager.GetCurrentPage();
            var subPage    = page.subPages.Skip(1).Any() ? page.currentSubPage : null;

            // Add the name of the sub page into the filter name for now
            if (!string.IsNullOrEmpty(subPage?.name))
            {
                filterName += "/" + subPage.name;
            }
            return(filterName);
        }
 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;
 }
Ejemplo n.º 4
0
 public PackageUnlockButton(PageManager pageManager)
 {
     m_PageManager = pageManager;
 }
 public PackageDeselectButton(PageManager pageManager, string analyticsEventName = null)
 {
     m_PageManager        = pageManager;
     m_AnalyticsEventName = analyticsEventName;
 }
Ejemplo n.º 6
0
 public PackageItem(PageManager pageManager, PackageManagerProjectSettingsProxy settingsProxy, PackageDatabase packageDatabase)
 {
     ResolveDependencies(pageManager, settingsProxy, packageDatabase);
 }
Ejemplo n.º 7
0
 private void ResolveDependencies(PageManager pageManager, PackageManagerProjectSettingsProxy settingsProxy, PackageDatabase packageDatabase)
 {
     m_PageManager     = pageManager;
     m_SettingsProxy   = settingsProxy;
     m_PackageDatabase = packageDatabase;
 }