Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #15 from xavion-lux/main
Browse files Browse the repository at this point in the history
  • Loading branch information
tetra-fox authored May 2, 2022
2 parents ccf4992 + 64bde2b commit 86cbcd6
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 14 deletions.
20 changes: 19 additions & 1 deletion AdBlocker/AdBlockerMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

[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;

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";
}

Expand Down Expand Up @@ -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);
}
}
}
}
10 changes: 6 additions & 4 deletions AdBlocker/AdBlockerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ internal static class Settings
public static MelonPreferences_Entry<bool> RemoveVrcPlusGift;
public static MelonPreferences_Entry<bool> RemoveVrcPlusTab;
public static MelonPreferences_Entry<bool> RemoveVrcPlusPfp;
public static MelonPreferences_Entry<bool> RemoveVrcPlusGetMoreFavorites;

public static event Action OnConfigChanged;

Expand All @@ -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;

Expand Down
56 changes: 47 additions & 9 deletions AdBlocker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<sup>*</sup>
- VRC+ Menu Tab<sup>*</sup>

<sup>*if you are using emmVRC to remove these UI elements, leave these options enabled, otherwise you may encounter
<details>
<summary>Quick menu carousel</summary>
<br>
<img src="https://i.imgur.com/cljy7oN.png">
</details>

<details>
<summary>VRC+ banner</summary>
<br>
</details>

<details>
<summary>VRC+ gift buttons</summary>
<br>
<img src="https://i.imgur.com/NmBIgmw.png"/>
<img src="https://i.imgur.com/K2tg6wW.png"/>
</details>

<details>
<summary>"Get More Favorites" button</summary>
<br>
<img src="https://i.imgur.com/I9qV7nh.png"/>
</details>

<details>
<summary>VRC+ change PFP button</summary>
<sup>It is not recommended to use this option if you have VRC+</sup>
<br>
<img src="https://i.imgur.com/G65Eme0.png"/>
</details>

<details>
<summary>VRC+ UserInfo supporter button<sup>*</sup></summary>
<sup>Do not enable this option when emmVRC is loaded</sup>
<br>
<img src="https://i.imgur.com/y37lqYL.png"/>
</details>

<details>
<summary>VRC+ Menu Tab<sup>*</sup></summary>
<sup>Do not enable this option when emmVRC is loaded</sup>
<br>
<img src="https://i.imgur.com/qk0kpot.png"/>
</details>

<br>
<sup>*if you are using emmVRC to remove these UI elements, leave these options disabled, otherwise you may encounter
issues</sup>

If you have VRC+ and are missing buttons, please verify that those aren't removed by the mod (e.g. the change profile
Expand All @@ -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?

0 comments on commit 86cbcd6

Please sign in to comment.