// Token: 0x060061C8 RID: 25032 RVA: 0x00227E20 File Offset: 0x00226220
 protected override void FetchAndRenderElements(int page)
 {
     if (this.world != null)
     {
         int num = 0;
         List <ApiWorld.WorldInstance> list = new List <ApiWorld.WorldInstance>();
         PageWorldInfo info = base.gameObject.GetComponentInParent <PageWorldInfo>();
         List <ApiWorld.WorldInstance> collection = new List <ApiWorld.WorldInstance>(this.world.worldInstances);
         list.AddRange(collection);
         list.RemoveAll((ApiWorld.WorldInstance i) => i.GetAccessType() == ApiWorld.WorldInstance.AccessType.FriendsOfGuests && i.GetInstanceCreator() != APIUser.CurrentUser.id);
         if (RoomManager.inRoom && RoomManager.currentRoom.id == this.world.id && RoomManager.currentOwnerId != APIUser.CurrentUser.id)
         {
             int count = PlayerManager.GetAllPlayers().Length;
             ApiWorld.WorldInstance            worldInstance = new ApiWorld.WorldInstance(RoomManager.currentRoom.currentInstanceIdWithTags, count);
             ApiWorld.WorldInstance.AccessType accessType    = worldInstance.GetAccessType();
             if (accessType == ApiWorld.WorldInstance.AccessType.InviteOnly || accessType == ApiWorld.WorldInstance.AccessType.FriendsOfGuests)
             {
                 list.Add(worldInstance);
             }
         }
         num += list.Sum((ApiWorld.WorldInstance wInst) => wInst.count);
         if (info != null)
         {
             list.RemoveAll((ApiWorld.WorldInstance i) => i.idWithTags == info.worldInstance.idWithTags);
         }
         int num2 = this.world.occupants - num;
         if (num2 > 0)
         {
             list.RemoveAll((ApiWorld.WorldInstance i) => i.GetAccessType() == ApiWorld.WorldInstance.AccessType.PrivatePopCounter);
             ApiWorld.WorldInstance item = new ApiWorld.WorldInstance("0" + ApiWorld.WorldInstance.BuildAccessTags(ApiWorld.WorldInstance.AccessType.PrivatePopCounter, string.Empty), num2);
             list.Add(item);
         }
         base.RenderElements <ApiWorld.WorldInstance>(list, 0);
     }
 }
 public static DownloadInfo CreateWorldPageDownloadInfo(
     ApiWorld ApiWorld,
     string InstanceIDTags,
     DownloadType DownloadType,
     PageWorldInfo PageWorldInfo)
 {
     return(new DownloadInfo(ApiWorld, InstanceIDTags, DownloadType, null, PageWorldInfo));
 }
 // Token: 0x060063A4 RID: 25508 RVA: 0x002366E8 File Offset: 0x00234AE8
 public void ShowRoomInstancePopup(ApiWorld world, PageWorldInfo pwi)
 {
     this.DisableAllPopups();
     this.roomInstancePopup.gameObject.SetActive(true);
     this.roomInstancePopup.Initialize(string.Empty, string.Empty);
     this.roomInstancePopup.SetupRoomInfo(world, pwi);
     VRCUiManager.Instance.ShowScreen("UserInterface/MenuContent/Popups/RoomInstancePopup");
 }
    // Token: 0x060061CA RID: 25034 RVA: 0x00228114 File Offset: 0x00226514
    public void ShowWorldInstanceDetails(ApiWorld w, ApiWorld.WorldInstance instance)
    {
        VRCUiPage page = VRCUiManager.Instance.GetPage("UserInterface/MenuContent/Screens/WorldInfo");

        VRCUiManager.Instance.ShowScreen(page);
        PageWorldInfo component = page.GetComponent <PageWorldInfo>();

        component.SetupWorldInfo(this.world, instance, false, component.openedFromPortal);
    }
Exemple #5
0
        public WorldsModule() : base(ExpandedMenu.WorldMenu, FavCatMod.Database.WorldFavorites, GetListsParent())
        {
            ExpansionKitApi.GetExpandedMenu(ExpandedMenu.WorldDetailsMenu).AddSimpleButton("Local Favorite", ShowFavMenu);

            myPageWorldInfo = GameObject.Find("UserInterface/MenuContent/Screens/WorldInfo").GetComponentInChildren <PageWorldInfo>();
            myPageWorldInfo.gameObject.AddComponent <EnableDisableListener>().OnEnabled += () =>
            {
                MelonCoroutines.Start(EnforceNewInstanceButtonEnabled());
            };
        }
 public DownloadInfo(
     ApiWorld ApiWorld,
     string InstanceIDTags,
     DownloadType DownloadType,
     PageUserInfo PageUserInfo   = null,
     PageWorldInfo PageWorldInfo = null,
     Notification Notification   = null)
 {
     this.ApiWorld       = ApiWorld;
     this.InstanceIDTags = InstanceIDTags;
     this.DownloadType   = DownloadType;
     this.PageUserInfo   = PageUserInfo;
     if (PageUserInfo != null)
     {
         this.APIUser = PageUserInfo.field_Public_APIUser_0;
     }
     this.PageWorldInfo = PageWorldInfo;
     this.Notification  = Notification;
 }
Exemple #7
0
    // Token: 0x060061D3 RID: 25043 RVA: 0x002283E8 File Offset: 0x002267E8
    public void ShowRoomDetails(ApiWorld w)
    {
        VRCUiPage page = VRCUiManager.Instance.GetPage("UserInterface/MenuContent/Screens/WorldInfo");

        VRCUiManager.Instance.ShowScreen(page);
        PageWorldInfo info = page.GetComponent <PageWorldInfo>();

        ApiWorld.WorldInstance winst = null;
        if (RoomManager.currentRoom != null && RoomManager.currentRoom.id == w.id)
        {
            int count = PlayerManager.GetAllPlayers().Length;
            winst = new ApiWorld.WorldInstance(RoomManager.currentRoom.currentInstanceIdWithTags, count);
        }
        info.SetupWorldInfo(w, winst, false, false);
        ApiWorld.Fetch(w.id, delegate(ApiWorld world)
        {
            info.SetupWorldInfo(world, winst, false, false);
        }, delegate(string error)
        {
            Debug.LogWarning("Could not join room: " + w.name);
        });
    }
 public static void UiInit()
 {
     menuController = QuickMenu.prop_QuickMenu_0.field_Public_MenuController_0;
     worldInfo      = GameObject.Find("UserInterface/MenuContent/Screens/WorldInfo").GetComponent <PageWorldInfo>();
     userInfo       = GameObject.Find("UserInterface/MenuContent/Screens/UserInfo").GetComponent <PageUserInfo>();
 }