InviteUserToGroupViaFriendsPanel
A class in Root.Township, Alta.Meta.UI.ServerManagement.
Client: server management panel listing the player's friends so they can be invited to a group. On Quest it also lists Oculus friends without a linked account.
- Listed in Menus, UI and platforms
- Inherits or implements
PanelComponent
Constructors
| Member | What it is |
|---|---|
InviteUserToGroupViaFriendsPanel() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private ListElementWithButton elementTemplate | List element prefab for a normal friend. |
private JoinedGroupManager group | The group invites are sent to. |
private ListElementWithButton oculusUserTemplate | List element prefab for an Oculus friend. |
private UIList uiList | The list the buttons are put in. |
Methods
| Member | What it is |
|---|---|
void InviteOculusFriendToGroup(Friend friend) | Shows a confirm popup, then invites the Oculus friend. |
void InviteToGroup(UserInfo user) | Shows a confirm popup, then invites the friend to the group. |
override async void RefreshData() | Rebuilds the friends list behind a loading screen. |
void SetupForGroup(JoinedGroupManager group) | Sets which group invites go to and opens the window. |
6 private and internal methods
| Member | What it is |
|---|---|
private Task AddOculusUser(Friend friend) | Calls the API to invite an Oculus friend to the group by their Oculus ID. |
private async void FinishInvite(UserInfo user) | Adds the user to the group's invites behind a loading screen, then closes the window. |
private async void FinishOculusInvite(Friend friend) | Sends the Oculus invite behind a loading screen, then closes the window. |
private async Task SetupFriendsList() | Fetches friends from the API (and unlinked Oculus friends on Quest) and fills the list. |
private void SpawnAltaFriendButtons(HashSet<UserInfo> altaUsers, ICollection<ListElementWithButton> newElements) | Makes one list button per friend that starts an invite. |
private void SpawnOculusFriendButtons(IEnumerable<Friend> nonAltaOculusUsers, ICollection<ListElementWithButton> newElements) | Makes one list button per unlinked Oculus friend that starts an Oculus invite. |
Used in
Members of other types that take, return or hold a InviteUserToGroupViaFriendsPanel: