void ShowAnimated()
        {
            if (shownTooltip == null)
            {
                shownTooltip = this;
                AsyncUpdate();
            }

            wantsToBeHidden = false;

            var opacity = resolvedStyle.opacity;

            if (opacity == 0)
            {
                style.left = topLeft.x;
                style.top  = topLeft.y;

                FitToWorldClip(fitMS: 0);
            }

            text.text = tooltip;

            experimental.animation.TopLeft(topLeft, MoveMS);
            experimental.animation.Start(opacity, 1, FadeInOutMS, (e, value) => e.style.opacity = value);
        }
Beispiel #2
0
        void Init()
        {
            editorsList.styleSheets.Add(headerStyles);

            tooltip = root.Get <TooltipElement>(".smart-inspector--tooltip");
            if (tooltip == null)
            {
                tooltip = new TooltipElement().Fluent().AddClass("smart-inspector--tooltip");
                root.Add(tooltip);
            }

            ScrollbarRedraw(Vector2.zero);
        }
        async void DelayHide()
        {
            hideTicks = HideDelayTicksCount;

            while (hideTicks > 0)
            {
                hideTicks--;
                await Task.Delay(HideDelayTickMS);

                if (!wantsToBeHidden)
                {
                    return;
                }
            }

            shownTooltip = null;

            var opacity = resolvedStyle.opacity;

            experimental.animation.Start(opacity, 0, FadeInOutMS, (e, value) => e.style.opacity = value);
        }