/// <summary>
    /// Creates a new ContactButton in the current contact list
    /// </summary>
    private void CreateNewContactObjectInList()
    {
        var button = contactButtonFactory.Create();

        button.SetButtonInfo(new ContactInfo(contactsPopup, addressInputField.Text, nameInputField.Text));

        Transform contactObject = button.transform.parent;

        contactObject.parent     = contactsPopup.contactsListTransform;
        contactObject.localScale = new Vector3(0f, 1f, 1f);
        contactObject.gameObject.AnimateScaleX(1f, 0.1f);
    }
Esempio n. 2
0
    /// <summary>
    /// Adds the contact buttons accourding to all the saved contacts in the SecurePlayerPrefs
    /// </summary>
    private void AddContactButtons()
    {
        if (contactsManager.ContactList.Count == 0)
        {
            return;
        }

        for (int i = 0; i < contactsManager.ContactList.Count; i++)
        {
            var button      = contactButtonFactory.Create();
            var contactInfo = contactsManager.ContactList[i];
            button.SetButtonInfo(new ContactInfo(this, contactInfo.ContactAddress, contactInfo.ContactName));

            Transform buttonParent = button.transform.parent;
            buttonParent.parent     = contactsListTransform;
            buttonParent.localScale = new Vector3(0f, 1f, 1f);
        }
    }