#if UNITY_2019_4_OR_NEWER using System; using System.Collections.Generic; using System.Linq; using com.zibra.liquid.Foundation.Editor; using JetBrains.Annotations; using UnityEditor; using UnityEngine.UIElements; namespace com.zibra.liquid.Foundation.UIElements { /// /// The button strip component let's you place buttons group with the labels or images. /// First and last buttons are styled to have round corners. /// Component is made to replace IMGUI Toolbar: /// internal sealed class ButtonStrip : VisualElement { /// [UsedImplicitly] public new class UxmlFactory : UxmlFactory { } /// /// /// public new class UxmlTraits : BindableElement.UxmlTraits {} /// /// ButtonStrip control Uss class name /// public const string UssClassName = "zibraai-button-strip"; const string k_ButtonClassName = UssClassName + "__button"; const string k_ButtonLeftClassName = k_ButtonClassName + "--left"; const string k_ButtonMidClassName = k_ButtonClassName + "--mid"; const string k_ButtonRightClassName = k_ButtonClassName + "--right"; const string k_ButtonIconClassName = UssClassName + "__button-icon"; const string k_ButtonActiveClassNameDark = k_ButtonClassName + "--active-dark"; const string k_ButtonActiveClassNameLight = k_ButtonClassName + "--active-light"; readonly List m_Choices = new List(); readonly List m_Labels = new List(); readonly List