public void OpenChannelSelect(CommunityButton button) { GameObject level2Canvas = Main.instance.AddChildToLevel2Canvas(this.m_channelSelectDialogPrefab); CommunityChannelDialog component = level2Canvas.GetComponent <CommunityChannelDialog>(); component.InitializeContentPane(button.m_community, new UnityAction <CommunityChannelButton>(this.SelectChannelButton), new UnityAction(level2Canvas.GetComponent <BaseDialog>().CloseDialog)); }
public void InitializeCommunitySettings(CommunityButton communityButton) { this.m_community = communityButton.m_community; this.m_headerText.text = this.m_community.Name; this.m_markReadCallback = new Action(communityButton.UpdateNotifications); this.m_community.RefreshMemberList(); this.m_community.RefreshStreams(); }
public void InitializeCommunitySettings(CommunityButton communityButton) { this.m_community = communityButton.m_community; this.m_headerText.text = this.m_community.Name; this.m_markReadCallback = new Action(communityButton.UpdateNotifications); this.m_community.RefreshMemberList(); this.m_community.RefreshStreams(); if (this.m_community.IsGuild()) { this.m_leaveCommunityButton.SetActive(false); } this.m_rolesAndRanksButton.SetActive(false); }
public void SelectCommunityButton(CommunityButton button) { ulong streamId = 0UL; string key = "DefaultChannel_" + button.m_community.ClubId.ToString(); if (SecurePlayerPrefs.HasKey(key)) { streamId = Convert.ToUInt64(SecurePlayerPrefs.GetString(key, Main.uniqueIdentifier)); } CommunityStream defaultStream = button.m_community.GetDefaultStream(streamId); if (defaultStream == null) { Main.instance.AddChildToLevel2Canvas(this.m_noChannelsAvailableDialogPrefab); } else { SecurePlayerPrefs.SetString(key, defaultStream.StreamId.ToString(), Main.uniqueIdentifier); this.OpenChatPanel(button.m_community, defaultStream); } }
public void SelectCommunityButton(CommunityButton button) { ulong num = (ulong)0; ulong clubId = button.m_community.ClubId; string str = string.Concat("DefaultChannel_", clubId.ToString()); if (SecurePlayerPrefs.HasKey(str)) { num = Convert.ToUInt64(SecurePlayerPrefs.GetString(str, Main.uniqueIdentifier)); } CommunityStream defaultStream = button.m_community.GetDefaultStream(num); if (defaultStream != null) { ulong streamId = defaultStream.StreamId; SecurePlayerPrefs.SetString(str, streamId.ToString(), Main.uniqueIdentifier); this.OpenChatPanel(button.m_community, defaultStream); } else { Main.instance.AddChildToLevel2Canvas(this.m_noChannelsAvailableDialogPrefab); } }