public void ShowAsConfirm(string title, string content, Action actionC, string nameC = "", string btnC = "button_orange_1", Transform root = null) { GlobalBattleDialogUIView.Instance.SetMask(0.7f, true, true); GlobalBattleDialogUIViewModel.Open(root); this.m_actionConfirm = actionC; this.ContentVisibility = true; this.Content1Visibility = false; this.Content2Visibility = false; this.BtnConfirmText = ((!string.IsNullOrEmpty(nameC)) ? nameC : this.BtnConfirmText); this.Title = title; this.Content = content; this.ImageBtnC = ButtonColorMgr.GetButton(btnC); this.BtnLeftVisibility = false; this.BtnRightVisibility = false; this.BtnConfirmVisibility = true; this.ToggleDontShowAgainVisibility = false; }
public void ShowAsOKCancel(string title, string content, Action actionL, Action actionR, string nameL = "取 消", string nameR = "确 定", string btnL = "button_orange_1", string btnR = "button_yellow_1", Transform root = null, bool isShowCloseBtn = true) { GlobalBattleDialogUIViewModel.Open(root); this.m_actionL = actionL; this.m_actionR = actionR; this.BtnRclose = true; this.BtnLeftText = ((!string.IsNullOrEmpty(nameL)) ? nameL : this.BtnLeftText); this.BtnRightText = ((!string.IsNullOrEmpty(nameR)) ? nameR : this.BtnRightText); this.Title = title; this.ContentVisibility = true; this.Content1Visibility = false; this.Content2Visibility = false; this.Content = content; this.ImageBtnL = ButtonColorMgr.GetButton(btnL); this.ImageBtnR = ButtonColorMgr.GetButton(btnR); this.BtnLeftVisibility = true; this.BtnRightVisibility = true; this.BtnConfirmVisibility = false; this.BtnCloseVisibility = isShowCloseBtn; this.ToggleDontShowAgainVisibility = false; }