public PackageDetails() { var root = Resources.GetTemplate("PackageDetails.uxml"); Add(root); cache = new VisualElementCache(root); PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { customContainer.Add(extension.CreateExtensionUI()); } }); root.StretchToParentSize(); SetContentVisibility(false); SetUpdateVisibility(false); developButton.visible = false; removeButton.visible = false; importButton.visible = false; downloadButton.visible = false; developButton.clickable.clicked += DevelopClick; detailAuthorLink.clickable.clicked += AuthorClick; updateButton.clickable.clicked += UpdateClick; removeButton.clickable.clicked += RemoveClick; importButton.clickable.clicked += ImportClick; downloadButton.clickable.clicked += DownloadOrCancelClick; detailDescMore.clickable.clicked += DescMoreClick; detailDescLess.clickable.clicked += DescLessClick; detailDesc.RegisterCallback <GeometryChangedEvent>(DescriptionGeometryChangeEvent); var editManifestIconButton = new IconButton(Resources.GetIconPath("edit")); editManifestIconButton.clickable.clicked += EditPackageManifestClick; editPackageManifestButton.Add(editManifestIconButton); GetTagLabel(PackageTag.Verified).text = ApplicationUtil.instance.shortUnityVersion + " verified"; }
public PackageStatusBar() { var root = Resources.GetTemplate("PackageStatusBar.uxml"); Add(root); cache = new VisualElementCache(root); m_LastErrorMessage = string.Empty; var refreshIconButton = new IconButton(Resources.GetIconPath("refresh")); refreshIconButton.clickable.clicked += () => { if (!EditorApplication.isPlaying) { PageManager.instance.Refresh(RefreshOptions.CurrentFilter); } }; refreshButtonContainer.Add(refreshIconButton); }
public PackageDetails() { root = Resources.GetTemplate("PackageDetails.uxml"); Add(root); Cache = new VisualElementCache(root); PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { CustomContainer.Add(extension.CreateExtensionUI()); } }); root.StretchToParentSize(); SetContentVisibility(false); SetUpdateVisibility(false); DevelopButton.visible = false; RemoveButton.visible = false; UpdateBuiltIn.visible = false; DevelopButton.clickable.clicked += DevelopClick; UpdateButton.clickable.clicked += UpdateClick; UpdateBuiltIn.clickable.clicked += UpdateClick; RemoveButton.clickable.clicked += RemoveClick; ViewDocButton.clickable.clicked += ViewDocClick; ViewChangelogButton.clickable.clicked += ViewChangelogClick; ViewLicenses.clickable.clicked += ViewLicensesClick; var editManifestIconButton = new IconButton(Resources.GetIconPath("edit")); editManifestIconButton.clickable.clicked += EditPackageManifestClick; EditPackageManifestButton.Add(editManifestIconButton); RegisterCallback <AttachToPanelEvent>(OnEnterPanel); RegisterCallback <DetachFromPanelEvent>(OnLeavePanel); UnityEditor.Selection.selectionChanged += OnEditorSelectionChanged; }
public PackageDetails() { var root = Resources.GetTemplate("PackageDetails.uxml"); Add(root); cache = new VisualElementCache(root); PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { customContainer.Add(extension.CreateExtensionUI()); } }); root.StretchToParentSize(); SetContentVisibility(false); SetUpdateVisibility(false); developButton.visible = false; removeButton.visible = false; developButton.clickable.clicked += DevelopClick; updateButton.clickable.clicked += UpdateClick; removeButton.clickable.clicked += RemoveClick; viewDocButton.clickable.clicked += ViewDocClick; viewChangelogButton.clickable.clicked += ViewChangelogClick; viewLicensesButton.clickable.clicked += ViewLicensesClick; var editManifestIconButton = new IconButton(Resources.GetIconPath("edit")); editManifestIconButton.clickable.clicked += EditPackageManifestClick; editPackageManifestButton.Add(editManifestIconButton); GetTagLabel(PackageTag.Verified).text = ApplicationUtil.instance.shortUnityVersion + " verified"; }