Skip to main content

OculusFriendsListPanel

A class in Root.Township, Alta.Meta.UI.ServerManagement.

Client panel meant to list Oculus friends and send them friend requests. In this build SetupFriendsList is empty, so the list never fills.

Constructors​

MemberWhat it is
OculusFriendsListPanel()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

6 private and internal fields
MemberWhat it is
private IAnalyticsService analyticsServiceAnalytics service used for friend request events.
private TextRenderer emptyListTextText shown when the list is empty.
private PanelComponent friendsListFriends list panel, marked to reload after a request is sent.
private ListElementWithButton listElementRow prefab for friends who have an Alta account.
private ListElementWithButton oculusOnlyListElementRow prefab for Oculus-only friends.
private UIList uiListThe list that holds the rows.

Methods​

MemberWhat it is
void Inject(IAnalyticsService analyticsService)VContainer injection point that supplies the analytics service.
override async void RefreshData()Calls SetupFriendsList behind a loading screen.
5 private and internal methods
MemberWhat it is
private async void InviteOculusUserToBeFriend(Friend oculusFriend)Asks the API to add an Oculus friend as an Alta friend, then refreshes this list and the friends list.
private async void InviteToBeFriend(INamedEntity friendship)Sends a friend request through SocialService, sends an analytics event and refreshes the lists.
private async Task SetupFriendsList()Empty in this build.
private void ShowOptionsForFriend(FriendshipInfo friendship)Shows an Invite option that calls InviteToBeFriend.
private void ShowOptionsForOculusFriend(Friend oculusFriend)Shows an Invite option that calls InviteOculusUserToBeFriend.

Used in​

Members of other types that take, return or hold a OculusFriendsListPanel: