Ejemplo n.º 1
0
    //空白处和背景是否可点击 由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);
    }
Ejemplo n.º 2
0
        protected void OK()
        {
            var KModalEvent = new KTableEvent()
            {
                Target = Modal
            };

            OnOK.InvokeAsync(KModalEvent);
        }
Ejemplo n.º 3
0
 public void OnBtnOKClicked()
 {
     this.gameObject.SetActive(false);
     if (okFunc != null)
     {
         okFunc.Invoke();
     }
     okFunc = null;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 void OnSave(object sender, EventArgs e)
 {
     optionsEdit.CopyProperties(options);
     Navigation.PopModalAsync();
     OnOK?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 6
0
 public void Executar()
 {
     OnOK.Invoke(this);
     Executed = true;
 }
Ejemplo n.º 7
0
    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);
    }
Ejemplo n.º 8
0
 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));
 }
Ejemplo n.º 9
0
 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));
 }
Ejemplo n.º 10
0
 /// <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 = "")
 {
 }
Ejemplo n.º 11
0
 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));
 }
Ejemplo n.º 12
0
 public static GameObject ShowSingleBtn(string message, GameObject parent, OnOK ok, string Btntext)
 {
     return(ShowSingleBtn(message, null, parent, null, Btntext, ok, DirectionPostion.Center));
 }
Ejemplo n.º 13
0
 public static GameObject ShowSingleBtn(string message, GameObject parent, OnOK ok)
 {
     return(ShowSingleBtn(message, parent, ok, null));
 }
Ejemplo n.º 14
0
 private void buttonComplete_Click(object sender, RoutedEventArgs e)
 {
     OnOK?.Invoke();
 }
Ejemplo n.º 15
0
 private void OnButtonOKClick(object sender, RoutedEventArgs e)
 {
     OnOK?.Invoke();
 }
 protected void OK()
 {
     Hide();
     OnOK.InvokeAsync(this);
 }
Ejemplo n.º 17
0
 public static GameObject Show(string message, GameObject parent, OnOK ok, OnCancel cancel)
 {
     return(Show(message, parent, ok, cancel, null, null));
 }