File tree Expand file tree Collapse file tree 4 files changed +19
-22
lines changed
Expand file tree Collapse file tree 4 files changed +19
-22
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77using HarmonyLib ;
88using Newtonsoft . Json ;
99using SMU . Utilities ;
10+ using SpinCore . Utility ;
1011using SRXDCustomVisuals . Core ;
1112using Unity . Collections . LowLevel . Unsafe ;
1213using Unity . Mathematics ;
Original file line number Diff line number Diff line change 44using BepInEx . Logging ;
55using HarmonyLib ;
66using SMU . Utilities ;
7+ using SpinCore ;
8+ using SpinCore . UI ;
79
810namespace SRXDCustomVisuals . Plugin ;
911
1012[ BepInDependency ( "com.pink.spinrhythm.moddingutils" , "1.0.7" ) ]
11- [ BepInPlugin ( "SRXD.CustomVisuals" , "CustomVisuals" , "1.0.0.1" ) ]
12- public class Plugin : BaseUnityPlugin {
13+ [ BepInDependency ( "com.pink.spinrhythm.spincore" , "1.0.0" ) ]
14+ [ BepInPlugin ( "SRXD.CustomVisuals" , "CustomVisuals" , "1.0.0.2" ) ]
15+ public class Plugin : SpinPlugin {
1316 public static Bindable < bool > EnableCustomVisuals { get ; private set ; }
1417
1518 public new static ManualLogSource Logger { get ; private set ; }
1619
17- private void Awake ( ) {
20+ protected override void Awake ( ) {
21+ base . Awake ( ) ;
22+
1823 Logger = base . Logger ;
1924
2025 var harmony = new Harmony ( "CustomVisuals" ) ;
2126
2227 Assembly . LoadFrom ( Path . Combine ( Path . GetDirectoryName ( Assembly . GetAssembly ( typeof ( Plugin ) ) . Location ) , "SRXDCustomVisuals.Behaviors.dll" ) ) ;
2328
2429 harmony . PatchAll ( typeof ( Patches ) ) ;
25- EnableCustomVisuals = new Bindable < bool > ( true ) ;
30+ EnableCustomVisuals = Config . CreateBindable ( "EnableCustomVisuals" , true ) ;
31+ }
32+
33+ protected override void Init ( ) {
34+ var root = MenuManager . CreateOptionsTab ( "Custom Visuals" ) . UIRoot ;
35+
36+ SpinUI . CreateToggle ( "Enable Custom Visuals" , root ) . Bind ( EnableCustomVisuals ) ;
2637 }
2738}
Original file line number Diff line number Diff line change 5151 <Reference Include =" Spin.Game.TrackPlaybackSystem" >
5252 <HintPath >..\Libs\Spin.Game.TrackPlaybackSystem.dll</HintPath >
5353 </Reference >
54+ <Reference Include =" SpinCore" >
55+ <HintPath >..\Libs\SpinCore.dll</HintPath >
56+ </Reference >
5457 <Reference Include =" SpinModdingUtilities" >
5558 <HintPath >..\Libs\SpinModdingUtilities.dll</HintPath >
5659 </Reference >
97100 </ItemGroup >
98101 <ItemGroup >
99102 <Compile Include =" BackgroundDefinition.cs" />
100- <Compile Include =" CustomChartUtility.cs" />
101103 <Compile Include =" CustomVisualsInfo.cs" />
102104 <Compile Include =" Patches.cs" />
103105 <Compile Include =" Plugin.cs" />
You can’t perform that action at this time.
0 commit comments