public static void Hide() { if (s_currentTooltip != null) { WindowController.Instance.OnTouch -= s_currentTooltip.UnHoverTouch; s_currentTooltip.Remove(); s_currentTooltip = null; } }
public static void Show(WidgetTooltip tooltip, Vector2 position, RectangleF region) { Hide(); tooltip.ZIndex = int.MaxValue; WidgetManager.GetTopmostWindow().AddChild(tooltip); tooltip.Update(); // make sure all sizes are settled up tooltip.Region = region; tooltip.UpdatePosition(position); WindowController.Instance.OnTouch += tooltip.UnHoverTouch; s_currentTooltip = tooltip; }