| | 1 | | using UnityEngine; |
| | 2 | | using UnityEngine.UI; |
| | 3 | |
|
| | 4 | | public class FriendEntry : FriendEntryBase |
| | 5 | | { |
| | 6 | | public event System.Action<FriendEntry> OnWhisperClick; |
| | 7 | | public event System.Action<FriendEntry> OnJumpInClick; |
| | 8 | |
|
| | 9 | | [SerializeField] internal JumpInButton jumpInButton; |
| | 10 | | [SerializeField] internal Button whisperButton; |
| | 11 | | [SerializeField] internal UnreadNotificationBadge unreadNotificationBadge; |
| | 12 | |
|
| | 13 | | public override void Awake() |
| | 14 | | { |
| 44 | 15 | | base.Awake(); |
| | 16 | |
|
| 44 | 17 | | whisperButton.onClick.RemoveAllListeners(); |
| 46 | 18 | | whisperButton.onClick.AddListener(() => OnWhisperClick?.Invoke(this)); |
| 44 | 19 | | } |
| | 20 | |
|
| | 21 | | private void Start() |
| | 22 | | { |
| 15 | 23 | | unreadNotificationBadge.Initialize(ChatController.i, userId); |
| 15 | 24 | | jumpInButton.Initialize(FriendsController.i, userId); |
| 15 | 25 | | jumpInButton.OnClick += () => OnJumpInClick?.Invoke(this); |
| 15 | 26 | | } |
| | 27 | |
|
| 44 | 28 | | public override void Populate(Model model) { base.Populate(model); } |
| | 29 | | } |