bool JoinGang(string master) { m_Master = master; m_Chat.Channel = string.Format(LobbyGangChat.CHANNEL, m_Master); if (IsVisible == false) { GuiFrontendMain.ShowPopup("LobbyGangGuest", "", ""); } else { SetDirty(); } return(true); }
IEnumerator JoinGang_Coroutine(string master) { m_IsJoining = true; bool canJoin = GuiFrontendMain.IsVisible; if (canJoin == true) { if (m_Master == null && IsVisible == false) { var friend = GameCloudManager.friendList.friends.Find(obj => obj.PrimaryKey == master); string nickname = GuiBaseUtils.FixNameForGui(friend.Nickname); string caption = TextDatabase.instance[0109064]; //string.Format(TextDatabase.instance[0109064], nickname); string text = string.Format(TextDatabase.instance[0109065], nickname); GuiPopup popup = GuiFrontendMain.ShowPopup("ConfirmDialog", caption, text, (inPopup, inResult) => { if (inResult != E_PopupResultCode.Ok) { canJoin = false; } }); while (popup.IsVisible == true) { yield return(new WaitForEndOfFrame()); if (m_IsJoining == false) { popup.ForceClose(); } } } if (canJoin == true) { canJoin = JoinGang(master); } } UpdateStatus(master, canJoin); m_IsJoining = false; }