Skip to content

Commit

Permalink
Changes go BRRRRRR
Browse files Browse the repository at this point in the history
  • Loading branch information
raineaeternal committed Dec 28, 2021
1 parent 7afae27 commit eb44968
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 128 deletions.
160 changes: 56 additions & 104 deletions CustomMenuPointers/CustomMenuPointers.csproj
Original file line number Diff line number Diff line change
@@ -1,147 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E1EF2736-762F-4E02-A384-758F4D3B38CF}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CustomMenuPointers</RootNamespace>
<AssemblyName>CustomMenuPointers</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<LangVersion>8</LangVersion>
<Nullable>disable</Nullable>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<LocalRefsDir Condition="Exists('..\Refs')">..\Refs</LocalRefsDir>
<BeatSaberDir>$(LocalRefsDir)</BeatSaberDir>
<AppOutputBase>$(MSBuildProjectDirectory)\</AppOutputBase>
<!--<PathMap>$(AppOutputBase)=X:\$(AssemblyName)\</PathMap>-->
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="$(DefineConstants.Contains('CIBuild')) OR '$(NCrunch)' == '1'">
<DisableCopyToPlugins>True</DisableCopyToPlugins>
</PropertyGroup>

<PropertyGroup Condition="'$(NCrunch)' == '1'">
<DisableCopyToPlugins>True</DisableCopyToPlugins>
<DisableZipRelease>True</DisableZipRelease>
</PropertyGroup>

<ItemGroup>
<Reference Include="BSML">
<HintPath>$(BeatSaberDir)\Plugins\Plugins\BSML.dll</HintPath>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Colors, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Main">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Colors">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Colors.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="GameplayCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<Reference Include="GameplayCore">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\GameplayCore.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HMLib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<Reference Include="HMLib">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\HMLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HMUI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<Reference Include="HMUI">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\HMUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="IPA.Loader, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\IPA.Loader.dll</HintPath>
</Reference>
<Reference Include="Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll</HintPath>
</Reference>
<Reference Include="SaberFactory">
<HintPath>$(BeatSaberDir)\Plugins\SaberFactory.dll</HintPath>
</Reference>
<Reference Include="SiraUtil, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Beat Saber\Plugins\SiraUtil.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="IPA.Loader">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\IPA.Loader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.TextMeshPro, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VRModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.VRModule.dll</HintPath>
<Reference Include="BSML">
<HintPath>$(BeatSaberDir)\Plugins\BSML.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Zenject, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<Reference Include="Zenject">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Zenject.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Zenject-usage, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<Reference Include="Zenject-usage">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Zenject-usage.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="SiraUtil">
<HintPath>$(BeatSaberDir)\Plugins\SiraUtil.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="SaberFactory">
<HintPath>$(BeatSaberDir)\Plugins\SaberFactory.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Installers\AppInstaller.cs" />
<Compile Include="Managers\CMPManager.cs" />
<Compile Include="Installers\MenuInstaller.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Configuration\PluginConfig.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\CMPSettingsView.cs" />
<Compile Include="UI\FlowCoordinators\UIFlowCoordinator.cs" />
<Compile Include="UI\MenuButtonUI.cs" />
<Compile Include="UI\MenuPointerSelectViewController.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="manifest.json" />
</ItemGroup>

<ItemGroup>
<None Include="Directory.Build.props" Condition="Exists('Directory.Build.props')" />
<None Include="Directory.Build.targets" Condition="Exists('Directory.Build.targets')" />
<None Include="CustomMenuPointers.csproj.user" Condition="Exists('CustomMenuPointers.csproj.user')" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BeatSaberModdingTools.Tasks">
<Version>1.4.3</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<EmbeddedResource Include="manifest.json" />
<EmbeddedResource Include="UI\*.bsml" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="UI\CMPSettingsView.bsml" />
<EmbeddedResource Include="UI\MenuPointerSelectView.bsml" />
<PackageReference Include="BeatSaberModdingTools.Tasks" Version="1.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
24 changes: 13 additions & 11 deletions CustomMenuPointers/Installers/AppInstaller.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
using CustomMenuPointers.Configuration;
using Zenject;

namespace CustomMenuPointers.Installers;

internal class CMPAppInstaller : Installer
namespace CustomMenuPointers.Installers
{
private readonly PluginConfig _config;

public CMPAppInstaller(PluginConfig config)
internal class CMPAppInstaller : Installer
{
_config = config;
}
private readonly PluginConfig _config;

public override void InstallBindings()
{
Container.BindInstance(_config);
public CMPAppInstaller(PluginConfig config)
{
_config = config;
}

public override void InstallBindings()
{
Container.BindInstance(_config);
}
}
}

6 changes: 5 additions & 1 deletion CustomMenuPointers/Installers/MenuInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using CustomMenuPointers.Managers;
using CustomMenuPointers.UI;
using IPA.Logging;
using SiraUtil.Logging;
using SiraUtil.Tools.FPFC;
using Zenject;

Expand All @@ -10,14 +11,17 @@ namespace CustomMenuPointers.Installers
internal class CMPMenuInstaller : Installer
{
internal IFPFCSettings _fpfc;
private SiraLog _siraLog;

internal CMPMenuInstaller(IFPFCSettings fpfc)
internal CMPMenuInstaller(IFPFCSettings fpfc, SiraLog siraLog)
{
_fpfc = fpfc;
_siraLog = siraLog;
}

public override void InstallBindings()
{
_siraLog.Info("Installing menu containers..");
Container.Bind<UIFlowCoordinator>().FromNewComponentOnNewGameObject().AsSingle();
//Container.Bind<MenuPointerSelectView>().FromNewComponentAsViewController().AsSingle();
Container.Bind<CMPSettingsView>().FromNewComponentAsViewController().AsSingle();
Expand Down
13 changes: 4 additions & 9 deletions CustomMenuPointers/UI/CMPSettingsView.bsml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
<!--<checkbox text='Use SF Saber as Pointer' value='sf-pointer' pad='5' />-->
<!--<slider-setting text='Pointer Thickness' />
<horizontal horizontal-fit='PreferredSize' vertical-fit='PreferredSize' spacing='2' /> -->
<text color='red' italics='true' text='This is not the final UI.' />
<text color='red' italics='true' text='This UI will change when CustomMenuPointers support Menu Pointer files.' />
<horizontal pad-top='3'>
<text text='Reload current pointer' font-size='5' />
<primary-button text='reload' on-click='reload' pad-left='45' />
</horizontal>
</vertical>
<horizontal spacing='50'/>
<horizontal horizontal-fit='PreferredSize' vertical-fit='PreferredSize' pad='2'>
<vertical>
<primary-button text='reload' on-click='reload' pad-left='75' pad-top='3' />
<!--<primary-button text='Remove Mesh' on-click="removeMesh" pad-left='75' pad-top='3' />-->
</vertical>
</horizontal>
</bg>
6 changes: 3 additions & 3 deletions CustomMenuPointers/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"description": "This mod allows you to use saber and eventually menupointer files in the menu!",
"gameVersion": "1.19.0",
"dependsOn": {
"BSIPA": "^4.2.0",
"BeatSaberMarkupLanguage": "^1.5.12",
"SiraUtil": "^3.0.0",
"BSIPA": "^4.2.1",
"BeatSaberMarkupLanguage": "^1.6.0",
"SiraUtil": "^3.0.2",
"SaberFactory": "^2.4.0"
}
}

0 comments on commit eb44968

Please sign in to comment.