Skip to main content

RecentPlayersListPanel

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

Client panel listing players the user recently played with, with options to add them as a friend or report them.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private IAnalyticsService analyticsServiceAnalytics service used for friend request and report events.
private TextRenderer emptyListTextText shown when there are no recent players.
private RecentPlayerPanelListElement listElementRow prefab cloned for each recent player.
private PanelComponent outgoingRequestsListOutgoing friend requests panel, marked to reload after a request.
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()Rebuilds the list behind a loading screen.
5 private and internal methods
MemberWhat it is
private async void AddPlayerAsFriend(RecentPlayerInteractionInfo player)Asks for confirmation, then sends a friend request and marks the outgoing requests list to reload.
private async Task LoadRecentPlayersList()Fetches recent player interactions and builds a row for each.
private async void ReportPlayer(RecentPlayerInteractionInfo player, ReportType reportType)Asks for confirmation, then reports the player for the chosen reason on the server where you met them.
private void ShowOptionsForPlayer(RecentPlayerInteractionInfo player)Shows "Add as Friend" (if not already friends) and "Report player" options.
private async void ShowReportPlayerPopup(RecentPlayerInteractionInfo player)Shows one option per ReportType, a frame later; each calls ReportPlayer.

Used in​

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