using Sirenix.Utilities; using UnityEngine; using UnityEngine.UIElements; using VOID.Generic.Dict; using VOID.UserInterface.Game.Util; using VOID.ScriptableObjects.Abilities; namespace VOID.UserInterface.Game.Tooltip { public class AbilityTooltipUI : ITooltip { // VisualElement - Container private readonly VisualElement _templateElement; // VisualElements - Sections private readonly VisualElement _titleSection; private readonly VisualElement _descriptionSection; private readonly VisualElement _footSection; // VisualElements - Data private readonly SlotUI _abilityIcon = new(); private readonly Label _abilityName; private readonly Label _abilityDescription; public AbilityTooltipUI(VisualElement templateElement) { // Tooltip for this type _templateElement = templateElement.Q(null, "tooltip"); // Sections _titleSection = templateElement.Q("title-section"); _descriptionSection = templateElement.Q("description-section"); _footSection = templateElement.Q("foot-section"); // Elements _abilityIcon.Init(templateElement.Q("ability-icon"), SlotType.None, -1); _abilityName = templateElement.Q