using System; using JetBrains.Annotations; using Unity.Cloud.Collaborate.Assets; using Unity.Cloud.Collaborate.UserInterface; using Unity.Cloud.Collaborate.Utilities; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; namespace Unity.Cloud.Collaborate.Components { internal class ChangesGroupHeader : VisualElement { public const string UssClassName = "changes-group-header"; public const string NameUssClassName = UssClassName + "__name"; public const string OverflowButtonUssClassName = UssClassName + "__overflow-button"; static readonly string k_LayoutPath = $"{CollaborateWindow.LayoutPath}/{nameof(ChangesGroupHeader)}.uxml"; static readonly string k_StylePath = $"{CollaborateWindow.StylePath}/{nameof(ChangesGroupHeader)}.uss"; readonly Label m_GroupName; readonly IconButton m_OverflowButton; public event Action OnOverflowButtonClicked; public ChangesGroupHeader() { // Get the layout and style sheet AddToClassList(UssClassName); AssetDatabase.LoadAssetAtPath(k_LayoutPath).CloneTree(this); styleSheets.Add(AssetDatabase.LoadAssetAtPath(k_StylePath)); // Initialise fields m_GroupName = this.Q