// Token: 0x060061C9 RID: 25033 RVA: 0x00227FC8 File Offset: 0x002263C8 protected override void SetPickerContentFromApiModel(VRCUiContentButton content, object am) { ApiWorld.WorldInstance wi = (ApiWorld.WorldInstance)am; string detail = (wi.count <= 0) ? string.Empty : wi.count.ToString(); ApiWorld.WorldInstance.AccessType accessType = wi.GetAccessType(); ApiWorld.WorldInstance.AccessDetail accessDetail = ApiWorld.WorldInstance.GetAccessDetail(accessType); Action action = null; if (accessType == ApiWorld.WorldInstance.AccessType.PrivatePopCounter) { content.EnableDetail(0, false); content.SetDetailShouldShowImage(1, false); content.EnableDetail(2, false); content.EnableDetail(4, true); content.SetDetailText(5, detail); } else { content.EnableDetail(0, true); content.SetDetailText(0, detail); content.SetDetailShouldShowImage(1, true); if (wi.count >= this.world.capacity) { } content.EnableDetail(2, true); content.SetDetailText(3, "#" + wi.idOnly + " " + accessDetail.shortName); content.EnableDetail(4, false); action = delegate { this.ShowWorldInstanceDetails(this.world, wi); }; } content.Initialize(this.world.thumbnailImageUrl, this.world.name, action, this.world.id); }
// Token: 0x060061D2 RID: 25042 RVA: 0x00228338 File Offset: 0x00226738 protected override void SetPickerContentFromApiModel(VRCUiContentButton content, object am) { ApiWorld w = (ApiWorld)am; content.SetDetailText(0, (w.occupants <= 0) ? string.Empty : w.occupants.ToString()); if (content.contentId != w.id) { content.Initialize(w.thumbnailImageUrl, w.name, delegate { this.ShowRoomDetails(w); }, w.id); } }
// Token: 0x0600615C RID: 24924 RVA: 0x00225EC0 File Offset: 0x002242C0 protected override void SetPickerContentFromApiModel(VRCUiContentButton content, object am) { ApiAvatar av = am as ApiAvatar; if (content.contentId != av.id) { content.Initialize(av.thumbnailImageUrl, av.name, delegate { Debug.Log("Picked new avatar: " + av.name); this.avatarPedestal.Refresh(av); if (this.myPage != null) { this.myPage.ChangedPreviewAvatar(); } }, av.id); } }
// Token: 0x06006307 RID: 25351 RVA: 0x00233A98 File Offset: 0x00231E98 private void CreatePickerFromBlueprint(ApiAvatar b) { GameObject gameObject = AssetManagement.Instantiate(this.pickerPrefab) as GameObject; RectTransform component = gameObject.GetComponent <RectTransform>(); component.SetParent(this.panel.transform); component.localScale = Vector3.one; component.localRotation = Quaternion.identity; component.localPosition = new Vector3(this.defaultRect.width / 2f + (float)this.pickers.Count * this.spacing, 0f, 0f); VRCUiContentButton component2 = gameObject.GetComponent <VRCUiContentButton>(); component2.list = this.list; component2.Initialize(b.imageUrl, b.name, delegate { User.CurrentUser.SetCurrentAvatar(b); VRCUiManager.Instance.HideScreen("SCREEN"); }, b.id); this.pickers.Add(component2); }
// Token: 0x060061A4 RID: 24996 RVA: 0x002275B8 File Offset: 0x002259B8 protected override void SetPickerContentFromApiModel(VRCUiContentButton content, object am) { APIUser user = null; content.SetDetailShouldShowImage(0, false); content.SetDetailShouldShowImage(1, false); content.SetDetailShouldShowImage(2, false); if (am is ApiNotification) { ApiNotification notif = (ApiNotification)am; user = new APIUser(); user.Init(notif); content.Initialize(user.currentAvatarThumbnailImageUrl, user.displayName, null, notif.id); APIUser.Fetch(notif.senderUserId, delegate(APIUser u) { content.Initialize(u.currentAvatarThumbnailImageUrl, u.displayName, delegate { VRCUiPage page = VRCUiManager.Instance.GetPage("UserInterface/MenuContent/Screens/UserInfo"); VRCUiManager.Instance.ShowScreen(page); ((PageUserInfo)page).SetupUserInfo(u, PageUserInfo.InfoType.ReceivedFriendRequest, UiUserList.ListType.None); ((PageUserInfo)page).notification = notif; }, notif.id); }, null); } else { user = (APIUser)am; content.Initialize(user.currentAvatarThumbnailImageUrl, user.displayName, delegate { PageUserInfo.InfoType infoType = PageUserInfo.InfoType.NotFriends; VRCUiPage page = VRCUiManager.Instance.GetPage("UserInterface/MenuContent/Screens/UserInfo"); VRCUiManager.Instance.ShowScreen(page); bool flag = false; if (APIUser.CurrentUser.friends != null) { flag = (APIUser.CurrentUser.friends.Find((APIUser u) => u.id == user.id) != null); } switch (this.listType) { case UiUserList.ListType.InWorld: if (flag) { infoType = PageUserInfo.InfoType.OnlineFriend; } else { infoType = PageUserInfo.InfoType.NotFriends; } break; case UiUserList.ListType.FriendRequests: infoType = PageUserInfo.InfoType.ReceivedFriendRequest; break; case UiUserList.ListType.OnlineFriends: infoType = PageUserInfo.InfoType.OnlineFriend; break; case UiUserList.ListType.OfflineFriends: infoType = PageUserInfo.InfoType.OfflineFriend; break; case UiUserList.ListType.Invites: infoType = PageUserInfo.InfoType.Invited; break; case UiUserList.ListType.HelpRequests: infoType = PageUserInfo.InfoType.ReceivedHelpRequest; break; case UiUserList.ListType.Search: { Player player = PlayerManager.GetPlayer(user.id); bool flag2 = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible; if (flag) { infoType = ((!flag2) ? PageUserInfo.InfoType.OnlineFriend : PageUserInfo.InfoType.OfflineFriend); } else { infoType = PageUserInfo.InfoType.NotFriends; } break; } } ((PageUserInfo)page).SetupUserInfo(user, infoType, this.listType); }, user.id); } if (this.listType == UiUserList.ListType.FriendRequests) { content.SetDetailShouldShowImage(2, true); } else if (ModerationManager.Instance.IsBlocked(user.id)) { content.SetDetailShouldShowImage(1, true); } else if (APIUser.IsFriendsWith(user.id)) { content.SetDetailShouldShowImage(0, true); } }