diff --git a/AdBlocker/AdBlockerMod.cs b/AdBlocker/AdBlockerMod.cs index b24a3b4..4c5afe2 100644 --- a/AdBlocker/AdBlockerMod.cs +++ b/AdBlocker/AdBlockerMod.cs @@ -4,6 +4,8 @@ [assembly: MelonInfo(typeof(AdBlocker.Mod), AdBlocker.BuildInfo.Name, AdBlocker.BuildInfo.Version, AdBlocker.BuildInfo.Author, AdBlocker.BuildInfo.DownloadLink)] [assembly: MelonGame("VRChat", "VRChat")] +[assembly: MelonAdditionalDependencies("VRChatUtilityKit")] +[assembly: MelonOptionalDependencies("UI Expansion Kit")] namespace AdBlocker; @@ -11,7 +13,7 @@ internal static class BuildInfo { public const string Name = "AdBlocker"; public const string Author = "tetra, Xavi"; - public const string Version = "1.0.3"; + public const string Version = "1.0.4"; public const string DownloadLink = "https://github.com/tetra-fox/VRCMods"; } @@ -127,5 +129,21 @@ private static void TryRemove() Logger.Error(e); } } + + if (Settings.RemoveVrcPlusGetMoreFavorites.Value) + { + try + { + GameObject.DestroyImmediate(Helpers.FindInactive("UserInterface/MenuContent/Screens/Avatar/Vertical Scroll View/Viewport/FavoriteListTemplate/GetMoreFavorites/MoreFavoritesButton")); + GameObject.DestroyImmediate(Helpers.FindInactive("UserInterface/MenuContent/Screens/Avatar/Vertical Scroll View/Viewport/FavoriteListTemplate/GetMoreFavorites/MoreFavoritesText")); + + Logger.Msg("Removed \"Get More Favorites\" Button"); + } + catch(Exception e) + { + Logger.Error("Failed to remove \"Get More Favorites\" Button"); + Logger.Error(e); + } + } } } \ No newline at end of file diff --git a/AdBlocker/AdBlockerSettings.cs b/AdBlocker/AdBlockerSettings.cs index e2d3bed..ccf38b9 100644 --- a/AdBlocker/AdBlockerSettings.cs +++ b/AdBlocker/AdBlockerSettings.cs @@ -12,6 +12,7 @@ internal static class Settings public static MelonPreferences_Entry RemoveVrcPlusGift; public static MelonPreferences_Entry RemoveVrcPlusTab; public static MelonPreferences_Entry RemoveVrcPlusPfp; + public static MelonPreferences_Entry RemoveVrcPlusGetMoreFavorites; public static event Action OnConfigChanged; @@ -23,10 +24,11 @@ public static void Register() // they use EnableDisable Listeners when opening the menu and we just make the objects go poof RemoveCarousel = Prefs.CreateEntry(nameof(RemoveCarousel), true, "Remove QM carousel"); RemoveVrcPlusBanner = Prefs.CreateEntry(nameof(RemoveVrcPlusBanner), true, "Remove VRC+ banner"); - RemoveVrcPlusSupporter = Prefs.CreateEntry(nameof(RemoveVrcPlusTab), false, "Remove VRC+ supporter button"); - RemoveVrcPlusGift = Prefs.CreateEntry(nameof(RemoveVrcPlusSupporter), false, "Remove VRC+ gift buttons"); - RemoveVrcPlusTab = Prefs.CreateEntry(nameof(RemoveVrcPlusPfp), false, "Remove VRC+ tab"); - RemoveVrcPlusPfp = Prefs.CreateEntry(nameof(RemoveVrcPlusGift), false, "Remove VRC+ PFP button"); + RemoveVrcPlusGift = Prefs.CreateEntry(nameof(RemoveVrcPlusGift), true, "Remove VRC+ gift buttons"); + RemoveVrcPlusGetMoreFavorites = Prefs.CreateEntry(nameof(RemoveVrcPlusGetMoreFavorites), true, "Remove \"Get More Favorites\" button"); + RemoveVrcPlusPfp = Prefs.CreateEntry(nameof(RemoveVrcPlusPfp), false, "Remove VRC+ PFP button"); + RemoveVrcPlusSupporter = Prefs.CreateEntry(nameof(RemoveVrcPlusSupporter), false, "Remove VRC+ supporter button"); + RemoveVrcPlusTab = Prefs.CreateEntry(nameof(RemoveVrcPlusTab), false, "Remove VRC+ tab"); OnConfigChanged += () => Changed = true; diff --git a/AdBlocker/README.md b/AdBlocker/README.md index 7938916..880ad42 100644 --- a/AdBlocker/README.md +++ b/AdBlocker/README.md @@ -4,14 +4,53 @@ Removes the carousels from the quick menu and more. Removes: -- Quick menu carousel -- VRC+ banner -- VRC+ gift buttons -- VRC+ change PFP button -- VRC+ UserInfo supporter button* -- VRC+ Menu Tab* - -*if you are using emmVRC to remove these UI elements, leave these options enabled, otherwise you may encounter +
+Quick menu carousel +
+ +
+ +
+VRC+ banner +
+
+ +
+VRC+ gift buttons +
+ + +
+ +
+"Get More Favorites" button +
+ +
+ +
+VRC+ change PFP button +It is not recommended to use this option if you have VRC+ +
+ +
+ +
+VRC+ UserInfo supporter button* +Do not enable this option when emmVRC is loaded +
+ +
+ +
+VRC+ Menu Tab* +Do not enable this option when emmVRC is loaded +
+ +
+ +
+*if you are using emmVRC to remove these UI elements, leave these options disabled, otherwise you may encounter issues If you have VRC+ and are missing buttons, please verify that those aren't removed by the mod (e.g. the change profile @@ -20,5 +59,4 @@ picture button). It's recommended that you use UIExpansionKit by knah. You can get it [here](https://github.com/knah/VRCMods/releases/latest). -![](https://i.imgur.com/Q9VTjJj.png) Isn't that so much better?