//空白处和背景是否可点击 由CfmOnly控制 public static GameObject ShowSingleBtn(string message, GameObject parent, OnOK ok, string Btntext, bool CfmOnly) { GameObject alertGo = ShowSingleBtn(message, null, parent, null, Btntext, ok, DirectionPostion.Center); AlertBox component = alertGo.GetComponent <AlertBox>(); return(alertGo); }
protected void OK() { var KModalEvent = new KTableEvent() { Target = Modal }; OnOK.InvokeAsync(KModalEvent); }
public void OnBtnOKClicked() { this.gameObject.SetActive(false); if (okFunc != null) { okFunc.Invoke(); } okFunc = null; }
public void OnShow(string title, string msg, BtnStatus bs, OnOK _okFunc, OnCancel _cancelFunc) { okFunc = _okFunc; cancelFunc = _cancelFunc; txtTitle.text = title; txtMsg.text = msg; btnCancel.gameObject.SetActive((bs & BtnStatus.BS_Cancel) > 0); btnOK.gameObject.SetActive((bs & BtnStatus.BS_OK) > 0); this.gameObject.SetActive(true); }
void OnSave(object sender, EventArgs e) { optionsEdit.CopyProperties(options); Navigation.PopModalAsync(); OnOK?.Invoke(this, EventArgs.Empty); }
public void Executar() { OnOK.Invoke(this); Executed = true; }
private static GameObject Show(string message, string title, GameObject parentGO, GameObject receiverGO, bool isSingle, string okStr, OnOK okFun, string cancelStr, OnCancel cancelFun, string checkStr = "", int bgClickType = 0, DirectionPostion align = DirectionPostion.Center) { GameObject prefab = ResourceManager.Instance.LoadExistsAsset <GameObject>("Prefab/UI/TipAlter/AlertBox"); if (parentGO == null) { parentGO = UIManager.TipLayer.gameObject; } GameObject obj3 = UGUITools.AddChild(parentGO, prefab); Util.SetLayer(obj3, parentGO.layer); AlertBox component = obj3.AddMissingComponent <AlertBox>(); if (string.IsNullOrEmpty(title)) { title = "提示"; } if (string.IsNullOrEmpty(okStr)) { okStr = "确定"; } if (string.IsNullOrEmpty(cancelStr)) { cancelStr = "取消"; } // 默认都是enable component.InitSetCommon(title, message, bgClickType, okStr, cancelStr, isSingle); component.mOnOK = okFun; component.mOnCancel = cancelFun; if (!string.IsNullOrEmpty(checkStr)) { component.AddSetCheckBoxInfo(checkStr); } return(obj3); }
public static GameObject Show(string message, string title, GameObject parent, OnOK ok, OnCancel cancel, string okStr, string cancelStr, string checkStr = "", int bgClickType = 0) { return(Show(message, title, parent, null, false, okStr, ok, cancelStr, cancel, checkStr, bgClickType)); }
public static GameObject Show(string message, GameObject parent, OnOK ok, OnCancel cancel, string okStr, string cancelStr, string checkStr = "", int bgClickType = 0, float maskAlpha = 0f, DirectionPostion pivot = DirectionPostion.Center) { return(Show(message, null, parent, null, false, okStr, ok, cancelStr, cancel, checkStr, bgClickType, pivot)); }
/// <summary> /// 消耗非绑定钻石的操作提示 /// </summary> /// <param name="needNum">需要消耗的非绑定钻石</param> /// <param name="okHandler"></param> /// <param name="msg">消耗非绑定钻石的提示语</param> /// <param name="cancel"></param> /// <param name="OnNotEnough"></param> /// <param name="parentGo"></param> public static void CheckUnbindDiamond(int needNum, OnOK okHandler, string msg = "", OnCancel cancel = null, Action OnNotEnough = null, GameObject parentGo = null, string StrOk = null, string Strcance = null, bool isCheckBox = false, string key = "") { }
private static GameObject ShowSingleBtn(string message, string title, GameObject parent, GameObject receiverGO, string btnStr, OnOK btnFun, DirectionPostion align) { return(Show(message, title, parent, receiverGO, true, btnStr, btnFun, null, null, "", 0, align)); }
public static GameObject ShowSingleBtn(string message, GameObject parent, OnOK ok, string Btntext) { return(ShowSingleBtn(message, null, parent, null, Btntext, ok, DirectionPostion.Center)); }
public static GameObject ShowSingleBtn(string message, GameObject parent, OnOK ok) { return(ShowSingleBtn(message, parent, ok, null)); }
private void buttonComplete_Click(object sender, RoutedEventArgs e) { OnOK?.Invoke(); }
private void OnButtonOKClick(object sender, RoutedEventArgs e) { OnOK?.Invoke(); }
protected void OK() { Hide(); OnOK.InvokeAsync(this); }
public static GameObject Show(string message, GameObject parent, OnOK ok, OnCancel cancel) { return(Show(message, parent, ok, cancel, null, null)); }