public PackageList() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageList.uxml"); Add(root); root.StretchToParentSize(); cache = new VisualElementCache(root); viewDataKey = "package-list-key"; scrollView.viewDataKey = "package-list-scrollview-key"; HidePackagesShowMessage(false, false); loginButton.clickable.clicked += OnLoginClicked; RegisterCallback <AttachToPanelEvent>(OnEnterPanel); RegisterCallback <DetachFromPanelEvent>(OnLeavePanel); RegisterCallback <GeometryChangedEvent>(OnGeometryChange); m_PackageItemsLookup = new Dictionary <string, PackageItem>(); focusable = true; }
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; itemName.text = name; itemName.tooltip = name; itemStatusNameContainer.Add(sampleItem.importStatus); itemSizeOrVersion.value = size; itemSizeOrVersion.tooltip = size; itemSizeOrVersion.isReadOnly = true; item.Add(sampleItem.importButton); }
public PackageSampleList() { var root = Resources.GetTemplate("PackageSampleList.uxml"); Add(root); cache = new VisualElementCache(root); }
public PackageStatusBar() { var root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); }
public PackageDependencies() { var root = Resources.GetTemplate("PackageDependencies.uxml"); Add(root); cache = new VisualElementCache(root); }
public PackageReleaseDetailsItem() { var root = Resources.GetTemplate("PackageReleaseDetailsItem.uxml"); Add(root); cache = new VisualElementCache(root); }
public PackageList() { var root = Resources.GetTemplate("PackageList.uxml"); Add(root); root.StretchToParentSize(); cache = new VisualElementCache(root); viewDataKey = "package-list-key"; scrollView.viewDataKey = "package-list-scrollview-key"; SetEmptyAreaDisplay(false); UIUtils.SetElementDisplay(loadMoreContainer, false); loginButton.clickable.clicked += OnLoginClicked; loadMoreLabel.OnLeftClick(LoadMoreItemsClicked); RegisterCallback <AttachToPanelEvent>(OnEnterPanel); RegisterCallback <DetachFromPanelEvent>(OnLeavePanel); m_PackageListLoaded = false; m_PackageItemsLookup = new Dictionary <string, PackageItem>(); m_RefreshInProgress = false; focusable = true; }
public PackageDetails() { root = Resources.GetTemplate("PackageDetails.uxml"); Add(root); Cache = new VisualElementCache(root); foreach (var extension in PackageManagerExtensions.Extensions) { CustomContainer.Add(extension.CreateExtensionUI()); } root.StretchToParentSize(); SetContentVisibility(false); SetUpdateVisibility(false); RemoveButton.visible = false; UpdateBuiltIn.visible = false; UpdateButton.clickable.clicked += UpdateClick; UpdateBuiltIn.clickable.clicked += UpdateClick; RemoveButton.clickable.clicked += RemoveClick; ViewDocButton.clickable.clicked += ViewDocClick; ViewChangelogButton.clickable.clicked += ViewChangelogClick; ViewLicenses.clickable.clicked += ViewLicensesClick; RegisterCallback <AttachToPanelEvent>(OnEnterPanel); RegisterCallback <DetachFromPanelEvent>(OnLeavePanel); }
public DropdownButton() { root = Resources.GetTemplate("DropdownButton.uxml"); Add(root); Cache = new VisualElementCache(root); DropDown.clickable.clicked += OnDropdownButtonClicked; }
public PackageStatusBar() { var root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); m_LastErrorMessages = new string[Enum.GetNames(typeof(PackageFilterTab)).Length]; }
public PackageStatusBar() { var root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); statusLabel.ShowTextTooltipOnSizeChange(); }
public PackageStatusBar() { var root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); statusLabel.RegisterCallback <GeometryChangedEvent>(OnSizeChange); }
public PackageStatusBar() { root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); Cache = new VisualElementCache(root); LastErrorMessage = string.Empty; operationsInProgress = new List <IBaseOperation>(); }
public PackageStatusBar() { var root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); m_LastErrorMessage = string.Empty; }
public PackageLoadBar() { var root = Resources.GetTemplate("PackageLoadBar.uxml"); Add(root); cache = new VisualElementCache(root); loadMinLabel.OnLeftClick(LoadMinItemsClicked); loadMaxLabel.OnLeftClick(LoadMaxItemsClicked); }
public void OnEnable() { this.SetAntiAliasing(4); if (s_Window == null) { s_Window = this; } if (s_Window != this) { return; } var windowResource = Resources.GetVisualTreeAsset("PackageManagerWindow.uxml"); if (windowResource != null) { var root = windowResource.CloneTree(); root.styleSheets.Add(Resources.GetStyleSheet()); cache = new VisualElementCache(root); PageManager.instance.Setup(); packageDetails.OnEnable(); packageList.OnEnable(); packageManagerToolbar.OnEnable(); packageStatusbar.OnEnable(); packageManagerToolbar.SetEnabled(!PackageDatabase.instance.isEmpty); packageDetails.packageToolbarContainer.SetEnabled(!PackageDatabase.instance.isEmpty); PackageDatabase.instance.onRefreshOperationFinish += OnRefreshOperationFinish; PackageDatabase.instance.onRefreshOperationStart += OnRefreshOperationStart; PackageDatabase.instance.onRefreshOperationError += OnRefreshOperationError; PackageManagerWindowAnalytics.Setup(); rootVisualElement.Add(root); root.StretchToParentSize(); PackageFiltering.instance.currentFilterTab = PackageManagerPrefs.instance.lastUsedPackageFilter ?? PackageFilterTab.All; if (!PageManager.instance.HasFetchedPageForFilterTab(PackageFiltering.instance.currentFilterTab)) { PageManager.instance.Refresh(RefreshOptions.CurrentFilter); } if (PackageFiltering.instance.currentFilterTab != PackageFilterTab.All && !PageManager.instance.HasFetchedPageForFilterTab(PackageFilterTab.All)) { PageManager.instance.Refresh(RefreshOptions.All); } EditorApplication.focusChanged += OnFocusChanged; } }
public PackageManagerToolbar() { root = Resources.GetTemplate("PackageManagerToolbar.uxml"); Add(root); root.StretchToParentSize(); Cache = new VisualElementCache(root); AddButton.RegisterCallback <MouseDownEvent>(OnAddButtonMouseDown); FilterButton.RegisterCallback <MouseDownEvent>(OnFilterButtonMouseDown); AdvancedButton.RegisterCallback <MouseDownEvent>(OnAdvancedButtonMouseDown); }
public PackageStatusBar() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); statusLabel.ShowTextTooltipOnSizeChange(); }
public PackageSampleList() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageSampleList.uxml"); Add(root); cache = new VisualElementCache(root); RegisterCallback <GeometryChangedEvent>(OnGeometryChanged); }
public PackageReleaseDetailsItem() { var root = Resources.GetTemplate("PackageReleaseDetailsItem.uxml"); Add(root); cache = new VisualElementCache(root); root.Query <TextField>().ForEach(t => { t.isReadOnly = true; }); }
public PackageLoadBar() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageLoadBar.uxml"); Add(root); cache = new VisualElementCache(root); loadMinLabel.OnLeftClick(LoadMinItemsClicked); loadMaxLabel.OnLeftClick(LoadMaxItemsClicked); }
public PackageSampleList() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageSampleList.uxml"); Add(root); cache = new VisualElementCache(root); SetExpanded(m_PackageManagerPrefs.samplesExpanded); samplesExpander.RegisterValueChangedCallback(evt => SetExpanded(evt.newValue)); RegisterCallback <GeometryChangedEvent>(OnGeometryChanged); }
public PackageManagerToolbar() { var root = Resources.GetTemplate("PackageManagerToolbar.uxml"); Add(root); root.StretchToParentSize(); Cache = new VisualElementCache(root); SetupAddMenu(); SetupFilterMenu(); SetupAdvancedMenu(); SetupSearchToolbar(); }
public PackageAddFromUrlField() { root = Resources.GetTemplate("PackageAddFromUrlField.uxml"); Add(root); Cache = new VisualElementCache(root); UrlTextField.value = urlText; AddButton.SetEnabled(!string.IsNullOrEmpty(urlText)); AddButton.clickable.clicked += OnAddButtonClick; RegisterCallback <AttachToPanelEvent>(OnEnterPanel); RegisterCallback <DetachFromPanelEvent>(OnLeavePanel); }
public PackageVersionItem(IPackage package, IPackageVersion version) { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageVersionItem.uxml"); Add(root); cache = new VisualElementCache(root); this.package = package; this.version = version; RefreshLabel(); this.OnLeftClick(() => m_PageManager.SetSelected(package, version, true)); }
public PackageReleaseDetailsItem() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageReleaseDetailsItem.uxml"); Add(root); cache = new VisualElementCache(root); root.Query <TextField>().ForEach(t => { t.isReadOnly = true; }); }
public ProgressBar() { UIUtils.SetElementDisplay(this, false); var root = Resources.GetTemplate("ProgressBar.uxml"); Add(root); root.StretchToParentSize(); cache = new VisualElementCache(root); currentProgressText.text = string.Empty; currentProgressBar.style.width = Length.Percent(0); }
public PackageSearchToolbar() { root = Resources.GetTemplate("PackageSearchToolbar.uxml"); Add(root); root.StretchToParentSize(); Cache = new VisualElementCache(root); SearchTextField.maxLength = 64; SearchTextField.name = ""; SearchCancelButton.clickable.clicked += SearchCancelButtonClick; RegisterCallback <AttachToPanelEvent>(OnEnterPanel); RegisterCallback <DetachFromPanelEvent>(OnLeavePanel); }
public PackageManagerToolbar() { var root = Resources.GetTemplate("PackageManagerToolbar.uxml"); Add(root); root.StretchToParentSize(); cache = new VisualElementCache(root); SetupAddMenu(); SetupFilterTabsMenu(); SetupOrdering(); SetupFilters(); SetupAdvancedMenu(); m_SearchTextChangeTimestamp = 0; }
public PackageItem(IPackage package) { var root = Resources.GetTemplate("PackageItem.uxml"); Add(root); cache = new VisualElementCache(root); itemLabel.OnLeftClick(SelectMainItem); seeAllVersionsLabel.OnLeftClick(SeeAllVersionsClick); arrowExpander.RegisterValueChangedCallback(ToggleExpansion); nameLabel.ShowTextTooltipOnSizeChange(); UpdateExpanderUI(false); SetPackage(package); UpdateVisualState(); }