public void ShowBox(EnMessageBoxType type, string content, DVoidBool callBack) { switch (type) { case EnMessageBoxType.OkOnly: BtnMiddle.SetActive(true); BtnLeft.SetActive(false); BtnRight.SetActive(false); break; case EnMessageBoxType.OkAndCancel: BtnMiddle.SetActive(false); BtnLeft.SetActive(true); BtnRight.SetActive(true); break; } _callBack = callBack; Content.text = content; Body.SetActive(true); }
public static void Show(EnMessageBoxType type, string content, DVoidBool callBack = null) { Self.ShowBox(type, content, callBack); }