public void PopulateFromInvite(CommunityPendingInvite pendingInvite)
 {
     this.m_headerText.text      = pendingInvite.CommunityName;
     this.m_membersText.text     = StaticDB.GetString(this.COMMUNITIES_DESCRIPTION_MEMBERS_KEY, "[PH] Members: %d").Replace("%d", pendingInvite.CommunityMemberCount.ToString());
     this.m_leaderText.text      = MobileClient.FormatString(StaticDB.GetString(this.COMMUNITIES_DESCRIPTION_INVITED_BY_KEY, "[PH] Invited by: %s"), pendingInvite.Inviter);
     this.m_descriptionText.text = pendingInvite.CommunityDescription;
 }
Exemplo n.º 2
0
 public void SetInviteForButton(CommunityPendingInvite pendingInvite)
 {
     this.m_communityInvite        = pendingInvite;
     this.m_headerText.text        = MobileClient.FormatString(StaticDB.GetString("COMMUNITIES_INVITIED_BY", "COMMUNITIES_INVITIED_BY"), pendingInvite.Inviter);
     this.m_communityNameText.text = this.m_communityInvite.CommunityName;
     this.m_communityIcon.sprite   = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, (int)((pendingInvite.AvatarId != 0u) ? pendingInvite.AvatarId : ((uint)StaticDB.communityIconDB.GetRecord(1).IconFileID)));
 }
Exemplo n.º 3
0
 private void AddCommunitiesToContent()
 {
     if (CommunityData.Instance.HasGuild())
     {
         GameObject gameObject = this.m_scrollContent.AddAsChildObject(this.m_scrollSectionHeaderPrefab);
         string     @string    = StaticDB.GetString("SOCIAL_CHARACTERS_GUILD", "[PH] %s'S GUILD");
         string     text       = MobileClient.FormatString(@string, Singleton <CharacterData> .Instance.CharacterName);
         gameObject.GetComponentInChildren <Text>().text = text;
         CommunityData.Instance.ForGuild(delegate(Community guild)
         {
             GameObject gameObject3 = this.m_scrollContent.AddAsChildObject(this.m_communityButtonPrefab);
             gameObject3.GetComponent <CommunityButton>().SetCommunity(guild);
         });
     }
     if (CommunityData.Instance.HasCommunities())
     {
         GameObject gameObject2 = this.m_scrollContent.AddAsChildObject(this.m_scrollSectionHeaderPrefab);
         string     string2     = StaticDB.GetString("SOCIAL_CHARACTERS_COMMUNITIES", "[PH] %s'S COMMUNITIES");
         string     text2       = MobileClient.FormatString(string2, Singleton <CharacterData> .Instance.CharacterName);
         gameObject2.GetComponentInChildren <Text>().text = text2;
         CommunityData.Instance.ForEachCommunity(delegate(Community community)
         {
             GameObject gameObject3 = this.m_scrollContent.AddAsChildObject(this.m_communityButtonPrefab);
             gameObject3.GetComponent <CommunityButton>().SetCommunity(community);
         });
     }
 }
Exemplo n.º 4
0
        public void OpenLeaveCommunityDialog()
        {
            string messageKey = MobileClient.FormatString(StaticDB.GetString("COMMUNITIES_CONFIRM_LEAVE_COMMUNITY_DESCRIPTION", "COMMUNITIES_CONFIRM_LEAVE_COMMUNITY_DESCRIPTION"), this.m_community.Name);

            Singleton <DialogFactory> .Instance.CreateOKCancelDialog("COMMUNITIES_CONFIRM_LEAVE_COMMUNITY", messageKey, delegate
            {
                this.m_community.LeaveOrDestroyClub();
            }, null);
        }
Exemplo n.º 5
0
 public void SetMemberInfo(CommunityMember member)
 {
     this.m_characterNameText.text = member.Name.ToUpper();
     this.m_kickButtonText.text    = MobileClient.FormatString(StaticDB.GetString("COMMUNITIES_KICK_MEMBER", "[PH] Kick %s"), this.m_characterNameText.text);
     this.m_member = member;
     this.SetRoleToggleState();
     this.SetValidAssignableRoles();
     this.m_memberRole.onValueChanged.AddListener((bool argument0) => this.SetMemberRole());
     this.m_moderatorRole.onValueChanged.AddListener((bool argument1) => this.SetModeratorRole());
     this.m_leaderRole.onValueChanged.AddListener((bool argument2) => this.SetLeaderRole());
     this.m_ownerRole.onValueChanged.AddListener((bool argument3) => this.SetOwnerRole());
 }
Exemplo n.º 6
0
        private void AddCommunitiesToContent()
        {
            GameObject gameObject = this.m_scrollContent.AddAsChildObject(this.m_scrollSectionHeaderPrefab);
            string     text       = MobileClient.FormatString("%s'S COMMUNITIES", Singleton <CharacterData> .Instance.CharacterName.ToUpper());

            gameObject.GetComponentInChildren <Text>().text = text;
            CommunityData.Instance.ForEachCommunity(delegate(Community community)
            {
                GameObject gameObject2 = this.m_scrollContent.AddAsChildObject(this.m_communityButtonPrefab);
                gameObject2.GetComponent <CommunityButton>().SetCommunity(community);
            });
        }
Exemplo n.º 7
0
        private void AddInvitationsToContent()
        {
            ReadOnlyCollection <CommunityPendingInvite> pendingInvites = CommunityData.Instance.GetPendingInvites();

            if (pendingInvites.Count > 0)
            {
                GameObject gameObject = this.m_scrollContent.AddAsChildObject(this.m_scrollSectionHeaderPrefab);
                gameObject.GetComponentInChildren <Text>().text = "PENDING INVITATIONS";
                GameObject gameObject2 = this.m_scrollContent.AddAsChildObject(this.m_inviteButtonPrefab);
                string     text        = (pendingInvites.Count <= 1) ? "1 INVITE" : "%s INVITATIONS";
                text = MobileClient.FormatString(text, pendingInvites.Count.ToString());
                gameObject2.GetComponentInChildren <Text>().text = text;
                gameObject2.GetComponentInChildren <Button>().onClick.AddListener(new UnityAction(this.OpenPendingInvitesDialog));
            }
        }
 private void AddCommunitiesToContent()
 {
     if (CommunityData.Instance.HasGuild())
     {
         GameObject gameObject = this.m_scrollContent.AddAsChildObject(this.m_scrollSectionHeaderPrefab);
         string     str        = StaticDB.GetString("SOCIAL_CHARACTERS_GUILD", "%s'S GUILD");
         string     str1       = MobileClient.FormatString(str, Singleton <CharacterData> .Instance.CharacterName.ToUpper());
         gameObject.GetComponentInChildren <Text>().text = str1;
         CommunityData.Instance.ForGuild((Community guild) => this.m_scrollContent.AddAsChildObject(this.m_communityButtonPrefab).GetComponent <CommunityButton>().SetCommunity(guild));
     }
     if (CommunityData.Instance.HasCommunities())
     {
         GameObject gameObject1 = this.m_scrollContent.AddAsChildObject(this.m_scrollSectionHeaderPrefab);
         string     str2        = StaticDB.GetString("SOCIAL_CHARACTERS_COMMUNITIES", "%s'S COMMUNITIES");
         string     str3        = MobileClient.FormatString(str2, Singleton <CharacterData> .Instance.CharacterName.ToUpper());
         gameObject1.GetComponentInChildren <Text>().text = str3;
         CommunityData.Instance.ForEachCommunity((Community community) => this.m_scrollContent.AddAsChildObject(this.m_communityButtonPrefab).GetComponent <CommunityButton>().SetCommunity(community));
     }
 }
Exemplo n.º 9
0
 public void InitializeReportDialog(CommunityChatMessage message)
 {
     this.m_reportedMessage = message;
     this.m_headerText.text = MobileClient.FormatString(StaticDB.GetString("REPORT_PLAYER_FOR", "[PH]Report " + message.Author + ":"), message.Author);
 }