public static void showCustomConfirmBox(string label, string titleStr, int type) { removeMessage(); MessageType boxType = MessageType.ConfirmBox; topFrame = ResourceManager.Instance.LoadPopUp(boxType.ToString()); //(GameObject)GameObject.Instantiate(confirmBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; topFrame.transform.localPosition = new Vector3(0, 0, box_z); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(boxType, label, titleStr); buttonYes = mbc.buttonYes; buttonNo = mbc.buttonNo; UISprite buttonSprite = buttonYes.transform.FindChild("Sprite").GetComponent <UISprite>(); switch (type) { case 6: buttonSprite.spriteName = "chongzhi"; UIEventListener.Get(buttonYes).onClick += GoRecharge; break; case 7: buttonSprite.spriteName = "shangpu_anniu_shenqing_1"; UIEventListener.Get(buttonYes).onClick += GoShop; break; case 8: buttonSprite.spriteName = "chuangdangwulin"; UIEventListener.Get(buttonYes).onClick += GoPVEWindow; break; case 10: buttonSprite.spriteName = "cancelprotect_1"; UIEventListener.Get(buttonYes).onClick += GoHeroInfoController; break; case 11: buttonSprite.spriteName = "withdraw_1"; UIEventListener.Get(buttonYes).onClick += GoSelectHeroController; break; case 13: buttonSprite.spriteName = "exchange_1"; break; default: break; } }
public static void showProcessMessage(string label) { removeMessage(); MessageType type = MessageType.ProcessBox; topFrame = ResourceManager.Instance.LoadPopUp(type.ToString()); //(GameObject)GameObject.Instantiate(processBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; topFrame.transform.localPosition = new Vector3(0, 0, box_z); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(type, label); buttonYes = mbc.buttonYes; buttonNo = mbc.buttonNo; }
//王明磊 - 背包已满 弹窗指引 public static void showBagFullBox(string label, string titleStr) { removeMessage(); MessageType type = MessageType.BagFullBox; topFrame = ResourceManager.Instance.LoadPopUp(type.ToString()); //(GameObject)GameObject.Instantiate(confirmBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; topFrame.transform.localPosition = new Vector3(0, 0, box_z); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(type, label, titleStr); buttonShop = mbc.buttonShop; buttonUpdate = mbc.buttonUpdate; buttonSell = mbc.buttonSell; buttonNo = mbc.buttonNo; }
public static void showChangeCardBox(string label, string titleStr) { removeMessage(); MessageType type = MessageType.ChangeCardBox; topFrame = ResourceManager.Instance.LoadPopUp(type.ToString()); //(GameObject)GameObject.Instantiate(confirmBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; topFrame.transform.localPosition = new Vector3(0, 0, box_z); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(type, label, titleStr); buttonShop = mbc.buttonShop; buttonYes = mbc.buttonYes; buttonNo = mbc.buttonNo; UIEventListener.Get(buttonShop).onClick += GoProtectCard; }
public static void showInputBoxMessage(string label) { // if(confirmBox==null) // { // confirmBox = Resources.Load("InputBox") as GameObject; // } removeMessage(); MessageType type = MessageType.InputBox; topFrame = ResourceManager.Instance.LoadPopUp(type.ToString()); //(GameObject)GameObject.Instantiate(confirmBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; topFrame.transform.localPosition = new Vector3(0, 0, box_z); //.transform;//Translate(Vector3.back*box_z,Space.Self); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(type, label); buttonYes = mbc.buttonYes; buttonNo = mbc.buttonNo; }
public static void showWaitingBox(string label) { // if(waitingBox==null) // { // waitingBox = Resources.Load("WaitingBox") as GameObject; // } removeMessage(); MessageType type = MessageType.WaitingBox; topFrame = ResourceManager.Instance.LoadPopUp(type.ToString()); //(GameObject)GameObject.Instantiate(waitingBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; //-200,waiting box应该是在最前层 topFrame.transform.localPosition = new Vector3(0, 0, box_z); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(type, label); buttonYes = mbc.buttonYes; buttonNo = mbc.buttonNo; }
public static void showMessage(string label, string titleStr) { // if(messageBox==null) // { // messageBox = Resources.Load("MessageBox") as GameObject; // } removeMessage(); // Debug.LogError("showMessage:"+label); MessageType type = MessageType.MessageBox; topFrame = ResourceManager.Instance.LoadPopUp(type.ToString()); //(GameObject)GameObject.Instantiate(messageBox); topFrame.transform.parent = Camera.main.transform; topFrame.transform.localScale = Vector3.one; topFrame.transform.localPosition = new Vector3(0, 0, box_z); MessageBoxController mbc = topFrame.GetComponent <MessageBoxController>(); mbc.init(type, label, titleStr); buttonYes = mbc.buttonYes; buttonNo = mbc.buttonNo; }