public void PopUpBuyConfirm(long marketID, int market_count, int prop_count, ShopType type, int cost) { System.Action act = () => { GameEvents.BuyEvent.OnShopReq.SafeInvoke(marketID, market_count, market_count * prop_count, type); #if Test MarkeBuyResponse res = new global::MarkeBuyResponse(); res.ResponseStatus = new ResponseStatus(); res.ResponseStatus.Code = 0; MarkeBuyResponse(res); #else MarkeBuyRequest req = new MarkeBuyRequest(); req.MarketItemId = (int)marketID; req.Count = market_count; GameEvents.NetWorkEvents.SendMsg.SafeInvoke(req); #endif }; PopUpData pd = new PopUpData(); pd.title = "goods_buy"; pd.content = "shop_now_buying"; pd.twoStr = "shop_no"; pd.isOneBtn = false; pd.oneAction = act; PopUpManager.OpenPopUp(pd); }
private void OnAddClick(GameObject obj) { if (string.IsNullOrEmpty(m_input.Text)) { return; } long val; if (false == long.TryParse(m_input.Text, out val)) { return; } if (val == GlobalInfo.MY_PLAYER_ID) { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = "friend_number_self_ID"; pd.content_param0 = ""; pd.isOneBtn = true; pd.OneButtonText = "UI.OK"; pd.twoStr = "UI.OK"; pd.oneAction = null; pd.twoAction = null; PopUpManager.OpenPopUp(pd); return; } #if !TEST //CurViewLogic().RequestAddFriend(val); GameEvents.UIEvents.UI_Friend_Event.Listen_AddFriend.SafeInvoke(val); #endif }
private void InitPanel(PopUpData data) { if (data == null) { return; } m_close_btn.Visible = data.isClose; m_one_root.Visible = data.isOneBtn; m_two_root.Visible = !data.isOneBtn; if (data.IsMultipleLanguage) { if (string.IsNullOrEmpty(data.content_param0)) { m_content_lab.Text = LocalizeModule.Instance.GetString(data.content); } else { m_content_lab.Text = LocalizeModule.Instance.GetString(data.content, data.content_param0); } } else { this.m_content_lab.Text = data.content; } if (string.IsNullOrEmpty(data.title)) { m_title_lab.Text = ""; } else { m_title_lab.Text = LocalizeModule.Instance.GetString(data.title); } if (data.isOneBtn) { if (data.IsMultipleLanguage && !string.IsNullOrEmpty(data.OneButtonText)) { m_one_lab.Text = LocalizeModule.Instance.GetString(data.OneButtonText); } } else { if (!string.IsNullOrEmpty(data.OneButtonText)) { m_twoFirst_lab.Text = LocalizeModule.Instance.GetString(data.OneButtonText); } if (!string.IsNullOrEmpty(data.twoStr)) { m_twoSecond_lab.Text = LocalizeModule.Instance.GetString(data.twoStr); } } if (data.order_in_layer > 0) { this.Canvas.sortingOrder = data.order_in_layer; } }
public static void OpenNormalOnePop(string content, string param = "", Action act_ = null) { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = content; pd.isOneBtn = true; pd.OneButtonText = "UI.OK"; pd.oneAction = act_; pd.content_param0 = param; OpenPop(pd); }
public static void OnCloseSureUI(string content, string continueStr, string exitStr, Action cb) { PopUpData pd = new PopUpData(); pd.isClose = true; pd.title = string.Empty; pd.content = content; pd.isOneBtn = false; pd.OneButtonText = exitStr; pd.twoStr = continueStr; pd.oneAction = cb; OpenPop(pd); }
private static void PopupInfo(string content_, string content_param0_ = "") { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = content_; pd.content_param0 = content_param0_; pd.isOneBtn = true; pd.twoStr = "UI.OK"; pd.oneAction = null; pd.twoAction = null; PopUpManager.OpenPopUp(pd); }
public void OfflineTipsNoRetry() { EngineCore.EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_SYNC_LOADING); PopUpData pd = new PopUpData(); pd.title = "NETWORK_TIME"; pd.content = "systen_unusual"; pd.content_param0 = null; pd.isOneBtn = true; pd.order_in_layer = 13000; PopUpManager.OpenPopUp(pd); }
public override void OnShow(object param) { base.OnShow(param); InitListener(); if (param != null) { m_data = (PopUpData)param; InitPanel(m_data); } //for (int i = 0; i < this.tweener.Length; i++) //{ // this.tweener[i].ResetAndPlayForward(); //} }
public static void OpenGoToCashShop() { PopUpData pd = new PopUpData(); pd.isClose = true; pd.title = "UI_PLAYERINFO_CASH_NOT_ENOUTH"; pd.content = "shop_no_note_tips"; pd.isOneBtn = true; pd.OneButtonText = "shop_go"; pd.oneAction = delegate() { EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_IAPCASH); }; OpenPop(pd); }
//public static void OpenGoToCoinShop() //{ // PopUpData pd = new PopUpData(); // pd.isClose = true; // pd.title = "shop_no_coin_tips_1"; // pd.content = "shop_no_coin_tips_2"; // pd.isOneBtn = true; // pd.OneButtonText = "shop_go"; // pd.oneAction = delegate () // { // EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_SHOPCOIN); // }; // OpenPop(pd); //} public static void OpenGoToCoinShop() { PopUpData pd = new PopUpData(); pd.isClose = false; pd.title = "shop_rmb_no"; pd.content = "shop_no_coin_tips_1"; pd.isOneBtn = true; pd.OneButtonText = "UI.OK"; //pd.oneAction = delegate () //{ // EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_SHOPCOIN); //}; OpenPop(pd); }
private static void OpenCashBuyErrorPop(string content) { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = content; pd.isOneBtn = false; pd.OneButtonText = "shop_no"; pd.twoStr = "shop_go"; pd.oneAction = null; pd.twoAction = delegate() { EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_IAPCASH); }; OpenPop(pd); }
public void OfflineTips() { HttpPingModule.Instance.Enable = false; EngineCore.EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_SYNC_LOADING); PopUpData pd = new PopUpData(); pd.title = "NETWORK_TIME"; pd.content = "systen_unusual"; pd.content_param0 = null; pd.isOneBtn = false; pd.twoStr = "close_button"; pd.order_in_layer = 13000; if (InOrOutScene.InScene == (InOrOutScene)((SceneModule.Instance.CurrentScene is GameSceneBase) ? 1 : 0)) { if (SceneBase.GameStatus.GAMEOVER != ((GameSceneBase)(SceneModule.Instance.CurrentScene)).CurGameStatus) { PauseGame(); pd.oneAction = SendNeedMoreTime; } else { pd.oneAction = TestNetworkAgain; } } else if (0 != LoadingManager.Instance.SCENE_ID) { PauseGame(); pd.oneAction = SendNeedMoreTime; } else { if (GameRoot.instance.GameFSM.CurrentState.StateFlag.Equals((int)ClientFSM.ClientState.LOGIN)) { pd.oneAction = null; ResetOfflineTime(); } else { pd.oneAction = TestNetworkAgain; } } pd.twoAction = BackToLogin; PopUpManager.OpenPopUp(pd); }
public static void OpenGoToVitShop() { PopUpData pd = new PopUpData(); pd.isClose = true; pd.title = "UI_ENTER_GAME_NO_ENERGY"; pd.content = "UI_ENERGY_buy"; pd.isOneBtn = true; pd.OneButtonText = "shop_go"; pd.oneAction = delegate() { FrameMgr.OpenUIParams ui_param = new FrameMgr.OpenUIParams(UIDefine.UI_SHOPENERGY); ui_param.Param = true; EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(ui_param); }; OpenPop(pd); }
private void DelPopUp() { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = "friend_delete"; pd.isOneBtn = false; pd.OneButtonText = "shop_no"; pd.twoStr = "UI.OK"; pd.oneAction = null; pd.twoAction = delegate() { EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.friend_unfriend.ToString()); GameEvents.UIEvents.UI_Friend_Event.OnInfoChanged.SafeInvoke(this.m_player_id, ENUM_INFO_CONTROL.E_DEL); }; PopUpManager.OpenPopUp(pd); }
private void TransactionTips(string desc_, bool ok_) { PopUpData pd = new PopUpData(); pd.title = "recharge_title"; if (ok_) { pd.content = "recharge_ok"; } else { pd.content = "recharge_fail"; } pd.content_param0 = desc_; pd.isOneBtn = true; PopUpManager.OpenPopUp(pd); }
private void OnClick(GameObject obj) { EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.game_star.ToString()); if (m_item_in_bag_num >= m_item_cost_num) { CurViewLogic().StartGame(); } else { PopUpData pd = new PopUpData() { title = string.Empty, content = "action_pt_mp", isOneBtn = true, OneButtonText = "UI.OK", }; PopUpManager.OpenPopUp(pd); } }
private void BackToLogin(string title_, string content_) { System.Action act = () => { BigWorldManager.Instance.ClearBigWorld(); EngineCoreEvents.ResourceEvent.LeaveScene.SafeInvoke(); FrameMgr.Instance.HideAllFrames(new List <string>() { UIDefine.UI_GUEST_LOGIN, UIDefine.UI_GM, UIDefine.UI_GUID }); TimeModule.Instance.SetTimeout(() => GameRoot.instance.GameFSM.GotoState((int)ClientFSM.ClientState.LOGIN), 1.0f); }; PopUpData pd = new PopUpData(); pd.title = title_; pd.content = content_; pd.isOneBtn = true; pd.oneAction = act; PopUpManager.OpenPopUp(pd); }
public static void OpenPopUp(PopUpData pd_) { OpenPop(pd_); }
private static void OpenPop(PopUpData pd) { FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_POPUP); param.Param = pd; EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param); }