Example #1
0
    public override void Initialize(FriendsHUDView owner)
    {
        base.Initialize(owner);

        receivedRequestsList.toggleTextPrefix = "RECEIVED";
        sentRequestsList.toggleTextPrefix     = "SENT";

        requestSentNotification.model.timer   = owner.notificationsDuration;
        requestSentNotification.model.groupID = FriendsHUDView.NOTIFICATIONS_ID;

        friendSearchFailedNotification.model.timer   = owner.notificationsDuration;
        friendSearchFailedNotification.model.groupID = FriendsHUDView.NOTIFICATIONS_ID;

        acceptedFriendNotification.model.timer   = owner.notificationsDuration;
        acceptedFriendNotification.model.groupID = FriendsHUDView.NOTIFICATIONS_ID;

        alreadyFriendsNotification.model.timer   = owner.notificationsDuration;
        alreadyFriendsNotification.model.groupID = FriendsHUDView.NOTIFICATIONS_ID;

        friendSearchInputField.onSubmit.AddListener(SendFriendRequest);
        friendSearchInputField.onValueChanged.AddListener(OnSearchInputValueChanged);
        addFriendButton.onClick.AddListener(() => friendSearchInputField.OnSubmit(null));
    }