public static void Postfix(APIUser __0 = null) //, InfoType __1, ListType __2 = ListType.None { if (__0 == null) { return; } if (__0.location == null) { FriendButton.button.SetActive(false); return; } if (!__0.isFriend || Utilities.isInSameWorld(__0) || __0.location.ToLower().Equals("private") || __0.location.ToLower().Equals("offline") ) { FriendButton.button.SetActive(false); } else { FriendButton.button.SetActive(true); MelonCoroutines.Start(FriendButton.UpdateText()); } }
void OnInitializeFriendButton(GameObject go, int wrapIndex, int realIndex) { if (lstDatas.Count <= 0) { return; } if (go == null) { return; } int lstIndex = realIndex % lstDatas.Count; if (lstIndex < 0) { lstIndex = -lstIndex; } FriendButton button = go.GetComponent <FriendButton>(); button.Set(lstDatas[lstIndex]._id, lstDatas[lstIndex]._name, lstDatas[lstIndex]._lastlogin.ToString(), lstDatas[lstIndex]._picture, lstDatas[lstIndex]._chkBox, lstDatas[lstIndex]._deleteMask); }
public void UiManagerInit() { InviteButton.Setup(); FriendButton.Setup(); WorldButton.Setup(); WorldDownloadStatus.Setup(); HudIcon.Setup(); }
static int FriendSortByLastLogin(FriendButton x, FriendButton y) { if (x == null || y == null) { return(0); } return(x.lastlogin.CompareTo(y.lastlogin)); }
static int FriendSortByName(FriendButton x, FriendButton y) { if (x == null || y == null) { return(0); } return(x.raw_name.CompareTo(y.raw_name)); }
public override void VRChat_OnUiManagerInit() { InviteButton.Setup(); FriendButton.Setup(); WorldButton.Setup(); WorldDownloadStatus.Setup(); HudIcon.Setup(); CacheManager.UpdateDirectories(); }
public override void VRChat_OnUiManagerInit() { GameObject.Find("UserInterface/QuickMenu/QuickModeMenus/QuickModeNotificationsMenu/ScrollRect/ViewPort/Content/NotificationUiPrefab/Row_NotificationActions").AddComponent <SelectedNotificationListener>(); GameObject.Find("UserInterface/QuickMenu/QuickModeMenus/QuickModeInviteResponseMoreOptionsMenu").AddComponent <NotificationMoreListener>(); InviteButton.Setup(); FriendButton.Setup(); WorldButton.Setup(); WorldDownloadStatus.Setup(); HudIcon.Setup(); }
// test void AddAllButton2() { int rand = 1; for (int i = 0; i < 100; i++) { GameObject tempGameObj = NGUITools.AddChild(grid.gameObject, button_Prefab); FriendButton comp = tempGameObj.GetComponent <FriendButton>(); rand = Random.Range(0, 100000); comp.Set(string.Format("id {0}", i), string.Format("name {0}", i), rand.ToString(), "f1"); //lst.Add(comp); } //SortingID(); //toggleSortByName.value = true; //grid.Reposition(); }
void AddAllButton() { TextAsset textAsset = Resources.Load <TextAsset>("friends"); JSONNode node = JSON.Parse(textAsset.text); for (int i = 0; i < node["data"].Count; i++) { GameObject tempGameObj = NGUITools.AddChild(grid.gameObject, button_Prefab); FriendButton comp = tempGameObj.GetComponent <FriendButton>(); comp.Set(node["data"][i]["name"], node["data"][i]["id"], node["data"][i]["lastlogin"], node["data"][i]["picture"]); lst.Add(comp); } SortingID(); toggleSortByName.value = true; grid.Reposition(); }
private static async void OnRecompress() { await TaskUtilities.YieldToMainThread(); CacheManager.CreateInfoFileFor(file); if (ModSettings.showHudMessages) { Utilities.QueueHudMessage("Download Finished"); } if (ModSettings.hideQMStatusWhenInActive) { WorldDownloadStatus.Disable(); } Downloading = false; CacheManager.AddDirectory(CacheManager.ComputeAssetHash(DownloadInfo.ApiWorld.id)); HudIcon.Disable(); InviteButton.UpdateTextDownloadStopped(); FriendButton.UpdateTextDownloadStopped(); WorldButton.UpdateTextDownloadStopped(); WorldDownloadStatus.gameObject.SetText(Constants.DOWNLOAD_STATUS_IDLE_TEXT); switch (DownloadInfo.DownloadType) { case DownloadType.Friend: if (!ModSettings.autoFollowFriends) { if (ModSettings.showPopupsOnComplete) { DisplayFriendPopup(); } } else { Utilities.GoToWorld(DownloadInfo.ApiWorld, DownloadInfo.InstanceIDTags, false); } break; case DownloadType.Invite: if (!ModSettings.autoFollowInvites) { if (ModSettings.showPopupsOnComplete) { DisplayInvitePopup(); } } else { Utilities.GoToWorld(DownloadInfo.ApiWorld, DownloadInfo.InstanceIDTags, true); } break; case DownloadType.World: if (!ModSettings.autoFollowWorlds) { if (ModSettings.showPopupsOnComplete) { DisplayWorldPopup(); } } else { Utilities.GoToWorld(DownloadInfo.ApiWorld, DownloadInfo.InstanceIDTags, false); } break; } }