Skip to content

Commit

Permalink
remove commonbtkui
Browse files Browse the repository at this point in the history
  • Loading branch information
200Tigersbloxed committed Aug 12, 2024
1 parent d402fc9 commit 998b9b6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Natively integrated VRCFaceTracking in ChilloutVR

> [!TIP]
>
> You can install [BTKUILib](https://github.com/BTK-Development/BTKUILib) (and optionally with [CommonBTKUI](https://github.com/dakyneko/DakyModsCVR/tree/master/CommonBTKUI)) to manage config options in-game; however, some options may require a game restart.
> You can install [BTKUILib](https://github.com/BTK-Development/BTKUILib) to manage config options in-game; however, some options may require a game restart.
### Integrated Tracking Support

Expand Down
2 changes: 1 addition & 1 deletion VRCFT2CVR.Plugin/PluginLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using MelonLoader;
using VRCFT2CVR.Plugin;

[assembly: MelonInfo(typeof(PluginLoader), "VRCFT2CVR.Plugin", "1.1.0", "200Tigersbloxed")]
[assembly: MelonInfo(typeof(PluginLoader), "VRCFT2CVR.Plugin", "1.1.1", "200Tigersbloxed")]
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
[assembly: MelonColor(255, 144, 242, 35)]
[assembly: MelonAuthorColor(255, 252, 100, 0)]
Expand Down
12 changes: 4 additions & 8 deletions VRCFT2CVR.Plugin/VRCFT2CVR.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
<AssemblyVersion>1.1.0</AssemblyVersion>
<FileVersion>1.1.0</FileVersion>
<AssemblyVersion>1.1.1</AssemblyVersion>
<FileVersion>1.1.1</FileVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down Expand Up @@ -70,13 +70,9 @@
<ItemGroup>
<Content Include="VRCFT2CVR.Plugin.csproj.user" />
</ItemGroup>

<ItemGroup>
<ModFile Include="../VRCFT2CVR/bin/$(Configuration)/net481/VRCFT2CVR.dll" />
</ItemGroup>

<Target Name="Build" BeforeTargets="Build">
<Copy SourceFiles="@(ModFile)" DestinationFolder="./" />
<Target Name="CopyCustomContent" BeforeTargets="Build">
<Copy SourceFiles="../VRCFT2CVR/bin/$(Configuration)/net481/VRCFT2CVR.dll" DestinationFolder="./" />
</Target>

</Project>
2 changes: 1 addition & 1 deletion VRCFT2CVR/MainMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Utils = VRCFaceTracking.Core.Utils;
using Vector2 = VRCFaceTracking.Core.Types.Vector2;

[assembly: MelonInfo(typeof(MainMod), MainMod.MOD_NAME, "1.1.0", "200Tigersbloxed")]
[assembly: MelonInfo(typeof(MainMod), MainMod.MOD_NAME, "1.1.1", "200Tigersbloxed")]
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
[assembly: MelonColor(255, 144, 242, 35)]
[assembly: MelonAuthorColor(255, 252, 100, 0)]
Expand Down
19 changes: 6 additions & 13 deletions VRCFT2CVR/OptionalUI.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Reflection;
#define NOIMAGE
using System.Reflection;
using MelonLoader;

namespace VRCFT2CVR;

internal class OptionalUI
{
private const string COMMONBTKUI_NAME = "Daky.DakyBTKUI";
private const string QUICKMENUAPI_NAME = "BTKUILib.QuickMenuAPI";
private const string PAGE_TYPE_NAME = "BTKUILib.UIObjects.Page";
private const string CATEGORY_TYPE_NAME = "BTKUILib.UIObjects.Category";
Expand All @@ -16,14 +16,12 @@ internal class OptionalUI

internal OptionalUI()
{
Type? commonType = null;
Type? quickMenuAPIType = null;
Type? pageType = null;
Type? categoryType = null;
Type? toggleType = null;
foreach (MelonAssembly melonAssembly in MelonAssembly.LoadedAssemblies)
{
commonType ??= melonAssembly.Assembly.GetType(COMMONBTKUI_NAME);
quickMenuAPIType ??= melonAssembly.Assembly.GetType(QUICKMENUAPI_NAME);
pageType ??= melonAssembly.Assembly.GetType(PAGE_TYPE_NAME);
categoryType ??= melonAssembly.Assembly.GetType(CATEGORY_TYPE_NAME);
Expand All @@ -35,15 +33,7 @@ internal OptionalUI()
"BTKUI was not detected! You must set settings manually through the MelonPreferences file.");
return;
}
if (commonType != null)
{
commonType.GetMethod("AutoGenerateCategory")!.Invoke(null, new object?[2]
{
Config.preferencesCategory,
null
});
return;
}
#if !NOIMAGE
// Prepare the icon
quickMenuAPIType.GetMethod("PrepareIcon")!.Invoke(null, new object[3]
{
Expand All @@ -56,6 +46,9 @@ internal OptionalUI()
"VRCFTIcon", null, false);
pageType.GetProperty("MenuTitle")!.SetValue(rootPage, MainMod.MOD_NAME + "Settings");
pageType.GetProperty("MenuSubtitle")!.SetValue(rootPage, "Edit Settings for " + MainMod.MOD_NAME);
#else
rootPage = quickMenuAPIType.GetProperty("MiscTabPage")!.GetValue(null);
#endif
// Add the Category
rootCategory =
pageType.GetMethod("AddCategory", new Type[1] {typeof(string)})!.Invoke(rootPage,
Expand Down
4 changes: 2 additions & 2 deletions VRCFT2CVR/VRCFT2CVR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
<AssemblyVersion>1.1.0</AssemblyVersion>
<FileVersion>1.1.0</FileVersion>
<AssemblyVersion>1.1.1</AssemblyVersion>
<FileVersion>1.1.1</FileVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down

0 comments on commit 998b9b6

Please sign in to comment.