/// <summary> /// Sets the button variables to the corresponding ones in the ContactInfo /// </summary> /// <param name="info"> The ContactInfo of this contact </param> protected override void OnValueUpdated(ContactInfo info) { RealContactName = info.ContactName; RealContactAddress = info.ContactAddress; contactsPopup = info.ContactsPopup; contactName.text = RealContactName?.LimitEnd(20, "..."); contactAddress.text = RealContactAddress?.Substring(0, 8) + "...." + RealContactAddress.Substring(RealContactAddress.Length - 8, 8); }
/// <summary> /// Sets this ContactsPopup to the original instance and initializes te closing action /// </summary> /// <param name="contactsPopup"> The ContactsPopup </param> /// <param name="popupClosed"> Action to run when this popup has closed </param> public void SetContactsPopup(ContactsPopup contactsPopup, Action popupClosed = null) { this.contactsPopup = contactsPopup; this.popupClosed = popupClosed; }
/// <summary> /// The contact info /// </summary> /// <param name="contactsPopup"> The active ContactsPopup </param> /// <param name="contactAddress"> The address of the contact. </param> /// <param name="contactName"> The name of the contact. </param> public ContactInfo(ContactsPopup contactsPopup, string contactAddress, string contactName) : this(contactAddress, contactName) { ContactsPopup = contactsPopup; }