This commit is contained in:
Caiyanpeng committed 2021-11-03 09:52:03 +08:00
1 parent 558fb16160
commit f92b623349
14 files changed
+696 -597

No files matched your search

+12 -2
View File
@@ -143,11 +143,21 @@ namespace Assets.Scripts
_deviceDict = value;
}
}
public static void showToast(GameObject game, string text, int duration = 2, int type = 0, Func<bool> stopFunc = null, bool isLowest = false,bool showSeconds = false,Action endCallback = null)
public static void showToast(GameObject p, string text, int duration = 2, int type = 0, Func<bool> stopFunc = null, bool isLowest = false,bool showSeconds = false,Action endCallback = null,PFUIPanel _parent = null)
{
//type 0错误 1正确
var parent = UIManager.Instance.ModalsPanel;
if (parent == null) return;
if (parent == null)
{
if (_parent)
{
parent = _parent;
}
else
{
return;
}
}
if (!parent.gameObject.activeInHierarchy) parent.gameObject.SetActive(true);
var toast = parent.transform.Find("ToastContainer");
if (toast != null)