/// <summary> /// 关闭提示界面 /// </summary> private void closeAlertWindow() { GlobalAlertWindow window = getWindowByid(EWindowID.Alert) as GlobalAlertWindow; if (window != null) { window.Close(); } }
/// <summary> /// 打开只有确定的提示界面 /// </summary> /// <param name="msg"></param> /// <param name="callback"></param> public void openAlertCenter(string msg, Action callback) { GlobalAlertWindow window = OpenWindow(EWindowID.Alert) as GlobalAlertWindow; window.Show(); window.showCenter(msg, () => { Debug.Log("close"); if (callback != null) { callback(); } }); }
/// <summary> /// 打开有确定,取消的提示界面 /// </summary> /// <param name="msg"></param> /// <param name="okFunc"></param> /// <param name="closeFunc"></param> public void openAlertLeftRight(string msg, Action okFunc, Action closeFunc) { GlobalAlertWindow window = OpenWindow(EWindowID.Alert) as GlobalAlertWindow; window.Show(); window.showLeftRight(msg, () => { Debug.Log("sure"); if (okFunc != null) { okFunc(); } }, () => { Debug.Log("close"); if (closeFunc != null) { closeFunc(); } }); }