public void SelectChannelButton(CommunityChannelButton button)
        {
            ulong  clubId   = button.Community.ClubId;
            string str      = string.Concat("DefaultChannel_", clubId.ToString());
            ulong  streamId = button.StreamId;

            SecurePlayerPrefs.SetString(str, streamId.ToString(), Main.uniqueIdentifier);
            this.OpenChatPanel(button.Community, button.Stream);
        }
 private void BuildContentPane()
 {
     this.m_content.DetachAllChildren();
     foreach (CommunityStream allStream in this.m_community.GetAllStreams())
     {
         GameObject             gameObject = this.m_content.AddAsChildObject(this.m_channelSelectPrefab);
         CommunityChannelButton component  = gameObject.GetComponent <CommunityChannelButton>();
         component.SetCommunityInfo(this.m_community, allStream);
         component.GetComponentInChildren <Button>().onClick.AddListener(() => this.m_selectCallback(component));
         component.GetComponentInChildren <Button>().onClick.AddListener(this.m_cleanupCallback);
     }
 }
        private void BuildContentPane()
        {
            this.m_content.DetachAllChildren();
            ReadOnlyCollection <CommunityStream> allStreams = this.m_community.GetAllStreams();

            foreach (CommunityStream stream in allStreams)
            {
                GameObject             gameObject    = this.m_content.AddAsChildObject(this.m_channelSelectPrefab);
                CommunityChannelButton channelButton = gameObject.GetComponent <CommunityChannelButton>();
                channelButton.SetCommunityInfo(this.m_community, stream);
                channelButton.GetComponentInChildren <Button>().onClick.AddListener(delegate
                {
                    this.m_selectCallback.Invoke(channelButton);
                });
                channelButton.GetComponentInChildren <Button>().onClick.AddListener(this.m_cleanupCallback);
            }
        }
Пример #4
0
 public void SelectChannelButton(CommunityChannelButton button)
 {
     SecurePlayerPrefs.SetString("DefaultChannel_" + button.Community.ClubId.ToString(), button.StreamId.ToString(), Main.uniqueIdentifier);
     this.OpenChatPanel(button.Community, button.Stream);
 }