示例#1
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 2:
                string text = LocalizedText.Get("sys.CONFIRM_GIVEUP");
                if (Object.op_Inequality((Object)SceneBattle.Instance, (Object)null) && SceneBattle.Instance.IsPlayingArenaQuest)
                {
                    text = LocalizedText.Get("sys.CONFIRM_GIVEUP_ARENA");
                }
                this.mGiveUpWindow = UIUtility.ConfirmBox(text, new UIUtility.DialogResultEvent(this.OnGiveUp), (UIUtility.DialogResultEvent)null, (GameObject)null, true, 1);
                break;

            case 100:
                if (!Object.op_Inequality((Object)this.mGiveUpWindow, (Object)null))
                {
                    break;
                }
                Win_Btn_DecideCancel_FL_C component = (Win_Btn_DecideCancel_FL_C)this.mGiveUpWindow.GetComponent <Win_Btn_DecideCancel_FL_C>();
                if (Object.op_Inequality((Object)component, (Object)null))
                {
                    component.BeginClose();
                }
                this.mGiveUpWindow = (GameObject)null;
                break;
            }
        }
 public override void OnActivate(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     if (Object.op_Inequality((Object)FlowNode_BuyGold.ConfirmBoxObj, (Object)null))
     {
         Win_Btn_DecideCancel_FL_C component = (Win_Btn_DecideCancel_FL_C)FlowNode_BuyGold.ConfirmBoxObj.GetComponent <Win_Btn_DecideCancel_FL_C>();
         if (Object.op_Inequality((Object)component, (Object)null))
         {
             component.BeginClose();
         }
         FlowNode_BuyGold.ConfirmBoxObj = (GameObject)null;
     }
     if (Object.op_Inequality((Object)FlowNode_BuyStamina.ConfirmBoxObj, (Object)null))
     {
         Win_Btn_DecideCancel_FL_C component = (Win_Btn_DecideCancel_FL_C)FlowNode_BuyStamina.ConfirmBoxObj.GetComponent <Win_Btn_DecideCancel_FL_C>();
         if (Object.op_Inequality((Object)component, (Object)null))
         {
             component.BeginClose();
         }
         FlowNode_BuyStamina.ConfirmBoxObj = (GameObject)null;
     }
     this.ActivateOutputLinks(1);
 }
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 10:
                if (!string.IsNullOrEmpty(this.parentName))
                {
                    this.parent = GameObject.Find(this.parentName);
                    if (Object.op_Equality((Object)this.parent, (Object)null))
                    {
                        DebugUtility.LogWarning("can not found gameObject:" + this.parentName);
                    }
                }
                string text = LocalizedText.Get(this.Text);
                if (this.richTag)
                {
                    text = LocalizedText.ReplaceTag(text);
                }
                string yesText = !string.IsNullOrEmpty(this.yesText) ? this.yesText : (string)null;
                string noText  = !string.IsNullOrEmpty(this.noText) ? this.noText : (string)null;
                this.winGO = !string.IsNullOrEmpty(this.Title) ? UIUtility.ConfirmBoxTitle(LocalizedText.Get(this.Title), text, new UIUtility.DialogResultEvent(this.OnClickOK), new UIUtility.DialogResultEvent(this.OnClickCancel), this.parent, this.systemModal, this.systemModalPriority, yesText, noText) : UIUtility.ConfirmBox(text, new UIUtility.DialogResultEvent(this.OnClickOK), new UIUtility.DialogResultEvent(this.OnClickCancel), this.parent, this.systemModal, this.systemModalPriority, yesText, noText);
                if (Object.op_Inequality((Object)this.winGO, (Object)null) && this.unscaledTime)
                {
                    Animator component = (Animator)this.winGO.GetComponent <Animator>();
                    if (Object.op_Inequality((Object)component, (Object)null))
                    {
                        component.set_updateMode((AnimatorUpdateMode)2);
                    }
                }
                this.ActivateOutputLinks(100);
                break;

            case 11:
                if (Object.op_Equality((Object)this.winGO, (Object)null))
                {
                    break;
                }
                if (string.IsNullOrEmpty(this.Title))
                {
                    Win_Btn_DecideCancel_FL_C btnDecideCancelFlC = !Object.op_Equality((Object)this.winGO, (Object)null) ? (Win_Btn_DecideCancel_FL_C)this.winGO.GetComponent <Win_Btn_DecideCancel_FL_C>() : (Win_Btn_DecideCancel_FL_C)null;
                    this.winGO = (GameObject)null;
                    if (Object.op_Inequality((Object)btnDecideCancelFlC, (Object)null))
                    {
                        btnDecideCancelFlC.BeginClose();
                    }
                }
                else
                {
                    Win_Btn_YN_Title_Flx winBtnYnTitleFlx = !Object.op_Equality((Object)this.winGO, (Object)null) ? (Win_Btn_YN_Title_Flx)this.winGO.GetComponent <Win_Btn_YN_Title_Flx>() : (Win_Btn_YN_Title_Flx)null;
                    this.winGO = (GameObject)null;
                    if (Object.op_Inequality((Object)winBtnYnTitleFlx, (Object)null))
                    {
                        winBtnYnTitleFlx.BeginClose();
                    }
                }
                this.ActivateOutputLinks(101);
                break;
            }
        }
示例#4
0
    public static GameObject ConfirmBox(string text, UIUtility.DialogResultEvent okEventListener, UIUtility.DialogResultEvent cancelEventListener, GameObject parent = null, bool systemModal = false, int systemModalPriority = -1)
    {
        GameSettings instance = GameSettings.Instance;
        Canvas       canvas   = UIUtility.PushCanvas(systemModal, systemModalPriority);

        if (Object.op_Inequality((Object)parent, (Object)null))
        {
            ((Component)canvas).get_transform().SetParent(parent.get_transform());
        }
        Win_Btn_DecideCancel_FL_C btnDecideCancelFlC = UIUtility.Instantiate <Win_Btn_DecideCancel_FL_C>(instance.Dialogs.YesNoDialog);

        ((Component)btnDecideCancelFlC).get_transform().SetParent(((Component)canvas).get_transform(), false);
        btnDecideCancelFlC.OnClickYes = okEventListener;
        btnDecideCancelFlC.OnClickNo  = cancelEventListener;
        btnDecideCancelFlC.Text_Message.set_text(text);
        UIUtility.FixFont(((Component)btnDecideCancelFlC).get_gameObject());
        return(((Component)btnDecideCancelFlC).get_gameObject());
    }
示例#5
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 2:
                this.mExitWindow = UIUtility.ConfirmBox(LocalizedText.Get("sys.MULTI_VERSUS_COMFIRM_EXIT"), new UIUtility.DialogResultEvent(this.OnGiveUp), (UIUtility.DialogResultEvent)null, (GameObject)null, true, 1, (string)null, (string)null);
                break;

            case 100:
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mExitWindow, (UnityEngine.Object)null))
                {
                    break;
                }
                Win_Btn_DecideCancel_FL_C component = (Win_Btn_DecideCancel_FL_C)this.mExitWindow.GetComponent <Win_Btn_DecideCancel_FL_C>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    component.BeginClose();
                }
                this.mExitWindow = (GameObject)null;
                break;
            }
        }