private static void Open(Transform root = null) { UIManagerControl.Instance.OpenUI("DialogExitUI", UINodesManager.TopUIRoot, false, UIType.NonPush); if (root == null) { root = UINodesManager.T4RootOfSpecial; } DialogExitUIViewModel.SetRoot(root); }
public void ShowAsConfirm(string title, string content, Action actionC, string nameC = "", string btnC = "button_orange_1", Transform root = null) { DialogExitUIViewModel.Open(root); this.m_actionConfirm = actionC; 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; }
public void ShowAsOKCancel(string title, string content, Action actionL, Action actionR, string nameL = "取 消", string nameR = "确 定", string btnL = "button_orange_1", string btnR = "button_orange_1", Transform root = null) { DialogExitUIViewModel.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.Content = content; this.ImageBtnL = ButtonColorMgr.GetButton(btnL); this.ImageBtnR = ButtonColorMgr.GetButton(btnR); this.BtnLeftVisibility = true; this.BtnRightVisibility = true; this.BtnConfirmVisibility = false; }
protected override void Awake() { base.Awake(); DialogExitUIViewModel.m_instance = this; }