Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Commit bac9761

Browse files
committed
Corrected Folder Names, project info, etc,.
1 parent 860af28 commit bac9761

22 files changed

Lines changed: 100 additions & 99 deletions

ConfigManButton/ConfigManButton.csproj renamed to COM3D2.ConfigManButton/COM3D2.ConfigManButton.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<Compile Include="Properties\AssemblyInfo.cs" />
5959
</ItemGroup>
6060
<ItemGroup>
61-
<ProjectReference Include="..\COM3D2.ConfigManButton\COM3D2.GUIAPI.csproj">
61+
<ProjectReference Include="..\COM3D2.GUIAPI\COM3D2.GUIAPI.csproj">
6262
<Project>{1d7832e3-8127-4a4c-ab02-cb1485630156}</Project>
6363
<Name>COM3D2.GUIAPI</Name>
6464
</ProjectReference>

COM3D2.ConfigManButton/Main.cs

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,56 @@
11
using BepInEx;
22
using BepInEx.Configuration;
33
using BepInEx.Logging;
4+
using ConfigurationManager;
45
using HarmonyLib;
56
using System;
6-
using System.Collections;
77
using System.Collections.Generic;
88
using System.Linq;
99
using System.Security;
1010
using System.Security.Permissions;
1111
using System.Text;
12-
using UnityEngine;
13-
using UnityEngine.SceneManagement;
12+
using COM3D2.GUIAPI;
1413

1514
//These two lines tell your plugin to not give a flying fuck about accessing private variables/classes whatever. It requires a publicized stubb of the library with those private objects though.
1615
[module: UnverifiableCode]
1716
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
1817

19-
namespace COM3D2.GUIAPI
18+
namespace ConfigManButton
2019
{
2120
//This is the metadata set for your plugin.
22-
[BepInPlugin("COM3D2.GUIAPI", "COM3D2.GUIAPI", "1.0")]
21+
[BepInPlugin("ConfigManButton", "ConfigManButton", "1.0")]
22+
[BepInDependency("com.bepis.bepinex.configurationmanager", BepInDependency.DependencyFlags.HardDependency)]
23+
[BepInDependency("COM3D2.GUIAPI", BepInDependency.DependencyFlags.HardDependency)]
2324
public class Main : BaseUnityPlugin
2425
{
2526
//static saving of the main instance. This makes it easier to run stuff like coroutines from static methods or accessing non-static vars.
26-
internal static Main This;
27+
public static Main @this;
2728

2829
//Static var for the logger so you can log from other classes.
29-
internal static ManualLogSource BepLogger;
30+
public static ManualLogSource logger;
3031

31-
internal static EventHandler MouseWheelScroll;
32+
//Config entry variable. You set your configs to this.
33+
internal static ConfigEntry<bool> DisableManagerHotkey;
34+
private ConfigurationManager.ConfigurationManager ConfigMan;
35+
private static COM3D2.GUIAPI.ConfigTabButton Button;
3236

3337
private void Awake()
3438
{
3539
//Useful for engaging coroutines or accessing variables non-static variables. Completely optional though.
36-
This = this;
40+
@this = this;
3741

3842
//pushes the logger to a public static var so you can use the bepinex logger from other classes.
39-
BepLogger = base.Logger;
43+
logger = Logger;
4044

41-
//Installs the patches in the Main class.
42-
var harmony = Harmony.CreateAndPatchAll(typeof(Main));
45+
//Binds the configuration. In other words it sets your ConfigEntry var to your config setup.
46+
DisableManagerHotkey = Config.Bind("General", "Disable ConfigManager Hotkey", false, "Will turn off the F1 key from activating config manager.");
4347

44-
ButtonHandler.StartButtonHandler();
45-
harmony.PatchAll(typeof(ButtonHandler));
46-
harmony.PatchAll(typeof(MenuHandler));
47-
}
48-
private void Update()
49-
{
50-
try
51-
{
52-
var scroll = Input.GetAxis("Mouse ScrollWheel");
48+
ConfigMan = GetComponent<ConfigurationManager.ConfigurationManager>();
5349

54-
if (scroll > 0 || scroll < 0) {
55-
MouseWheelScroll.Invoke(scroll, null);
56-
}
57-
}
58-
catch
59-
{
60-
61-
}
50+
Button = COM3D2.GUIAPI.ButtonHandler.CreateConfigTabButton("PLUGINS", new EventDelegate(() =>
51+
{
52+
ConfigMan.DisplayingWindow = !ConfigMan.DisplayingWindow;
53+
}));
6254
}
6355
}
6456
}

COM3D2.ConfigManButton/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("$COM3D2.ConfigManButton$")]
8+
[assembly: AssemblyTitle("$ConfigManButton$")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("$COM3D2.ConfigManButton$")]
12+
[assembly: AssemblyProduct("$ConfigManButton$")]
1313
[assembly: AssemblyCopyright("Copyright © 2021")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
@@ -20,7 +20,7 @@
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("1d7832e3-8127-4a4c-ab02-cb1485630156")]
23+
[assembly: Guid("37661c53-1bce-4164-84a8-f98cd825d56a")]
2424

2525
// Version information for an assembly consists of the following four values:
2626
//

COM3D2.ExampleCustomConfigMenu/COM3D2.ExampleCustomConfigMenu.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Compile Include="Properties\AssemblyInfo.cs" />
5454
</ItemGroup>
5555
<ItemGroup>
56-
<ProjectReference Include="..\COM3D2.ConfigManButton\COM3D2.GUIAPI.csproj">
56+
<ProjectReference Include="..\COM3D2.GUIAPI\COM3D2.GUIAPI.csproj">
5757
<Project>{1d7832e3-8127-4a4c-ab02-cb1485630156}</Project>
5858
<Name>COM3D2.GUIAPI</Name>
5959
</ProjectReference>

COM3D2.GUIAPI.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.31229.75
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.GUIAPI", "COM3D2.ConfigManButton\COM3D2.GUIAPI.csproj", "{1D7832E3-8127-4A4C-AB02-CB1485630156}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.ExampleCustomConfigMenu", "COM3D2.ExampleCustomConfigMenu\COM3D2.ExampleCustomConfigMenu.csproj", "{BD673F55-7F65-43CE-9233-08D31B3C9334}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigManButton", "ConfigManButton\ConfigManButton.csproj", "{37661C53-1BCE-4164-84A8-F98CD825D56A}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.GUIAPI", "COM3D2.GUIAPI\COM3D2.GUIAPI.csproj", "{1D7832E3-8127-4A4C-AB02-CB1485630156}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.ExampleCustomConfigMenu", "COM3D2.ExampleCustomConfigMenu\COM3D2.ExampleCustomConfigMenu.csproj", "{BD673F55-7F65-43CE-9233-08D31B3C9334}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "COM3D2.ConfigManButton", "COM3D2.ConfigManButton\COM3D2.ConfigManButton.csproj", "{37661C53-1BCE-4164-84A8-F98CD825D56A}"
1111
EndProject
1212
Global
1313
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1414
Debug|Any CPU = Debug|Any CPU
1515
Release|Any CPU = Release|Any CPU
1616
EndGlobalSection
1717
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Release|Any CPU.Build.0 = Release|Any CPU
1822
{1D7832E3-8127-4A4C-AB02-CB1485630156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1923
{1D7832E3-8127-4A4C-AB02-CB1485630156}.Debug|Any CPU.Build.0 = Debug|Any CPU
2024
{1D7832E3-8127-4A4C-AB02-CB1485630156}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -23,10 +27,6 @@ Global
2327
{37661C53-1BCE-4164-84A8-F98CD825D56A}.Debug|Any CPU.Build.0 = Debug|Any CPU
2428
{37661C53-1BCE-4164-84A8-F98CD825D56A}.Release|Any CPU.ActiveCfg = Release|Any CPU
2529
{37661C53-1BCE-4164-84A8-F98CD825D56A}.Release|Any CPU.Build.0 = Release|Any CPU
26-
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27-
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Debug|Any CPU.Build.0 = Debug|Any CPU
28-
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Release|Any CPU.ActiveCfg = Release|Any CPU
29-
{BD673F55-7F65-43CE-9233-08D31B3C9334}.Release|Any CPU.Build.0 = Release|Any CPU
3030
EndGlobalSection
3131
GlobalSection(SolutionProperties) = preSolution
3232
HideSolutionNode = FALSE
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)