/// <summary> /// Set data. /// </summary> private void _SetData(string title, string body, bool isShowCloseButton, Action <object> actionClose) { if (mTitle != null) { mTitle.text = title; } #if USE_MY_UI_TMPRO else if (mTitleTMPro != null) { mTitleTMPro.text = title; } #endif if (mBody != null) { mBody.text = body; } #if USE_MY_UI_TMPRO else if (mBodyTMPro != null) { mBodyTMPro.text = body; } #endif if (mButtonClose != null) { mButtonClose.SetActive(isShowCloseButton); } mActionClose = actionClose; }
/// <summary> /// Set data. /// </summary> private void _SetData(string title, string body, string buttonMain, Action <object> actionMain, bool isShowButtonClose, Action <object> actionClose, bool isAutoHideWhenClickButton) { if (mTitle != null) { mTitle.text = title; } #if USE_MY_UI_TMPRO else if (mTitleTMPro != null) { mTitleTMPro.text = title; } #endif if (mBody != null) { mBody.text = body; } #if USE_MY_UI_TMPRO else if (mBodyTMPro != null) { mBodyTMPro.text = body; } #endif if (mButtonClose != null) { mButtonClose.SetActive(isShowButtonClose); } mActionClose = actionClose; mButtonMain.SetText(buttonMain); mActionMain = actionMain; mIsAutoHideWhenClickButton = isAutoHideWhenClickButton; }