public static void Show(int type, object data, float delay = 0.2f, object spData = null) { isShow = true; RecycleAll(); if (tip == null || (tip != null && type != tipType)) { if (tip != null) { tip.Remove(); tip = null; } Type tipClass = GetToolTipType(type); tip = (BaseToolTip)Activator.CreateInstance(tipClass); } if (tip.IsCreate()) { if (tip.IsActive() == false) { tip.SetActive(true); } tip.spData = spData; tip.data = data; tip.SetParent(_container); tip.x = 0; tip.y = 0; OnEnterFrame(); tipType = type; } }
public static void Hide() { isShow = false; RecycleAll(); if (tip != null) { tip.Remove(); tip = null; } }