Skip to content

Commit 691ed69

Browse files
authored
Add files via upload
1 parent d636671 commit 691ed69

File tree

4 files changed

+179
-0
lines changed

4 files changed

+179
-0
lines changed

HideHInterface.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.572
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HideHInterface", "HideHInterface\HideHInterface.csproj", "{ADA27C55-A00A-4BE3-AFA2-1B40B3FDED3D}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{ADA27C55-A00A-4BE3-AFA2-1B40B3FDED3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{ADA27C55-A00A-4BE3-AFA2-1B40B3FDED3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{ADA27C55-A00A-4BE3-AFA2-1B40B3FDED3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{ADA27C55-A00A-4BE3-AFA2-1B40B3FDED3D}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {6EECB0A8-6A2D-4055-B0EB-957D7DBD9FED}
24+
EndGlobalSection
25+
EndGlobal

HideHInterface/HideHInterface.cs

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using BepInEx;
2+
using UnityEngine;
3+
using UnityEngine.SceneManagement;
4+
using System.ComponentModel;
5+
6+
7+
namespace HideHInterface {
8+
9+
[BepInProcess("Koikatu")]
10+
[BepInPlugin("HideHInterface", "Hide H Interface", "1.0")]
11+
public class HideHInterface : BaseUnityPlugin {
12+
[DisplayName("Hide H UI toggle")]
13+
[Description("The hotkey that toggles the H UI on or off.")]
14+
public static SavedKeyboardShortcut ToggleKey { get; private set; }
15+
16+
17+
HideHInterface() {
18+
ToggleKey = new SavedKeyboardShortcut("Hide H UI", this, new KeyboardShortcut(KeyCode.Space));
19+
}
20+
21+
void Awake() {
22+
SceneManager.sceneLoaded += Act;
23+
}
24+
25+
void OnDestroy() {
26+
SceneManager.sceneLoaded -= Act;
27+
}
28+
29+
void Act(Scene scene, LoadSceneMode load) {
30+
var check = gameObject.GetComponent<HideMB>();
31+
32+
if (FindObjectOfType<HScene>()) {
33+
if (!check) {
34+
gameObject.AddComponent<HideMB>();
35+
}
36+
} else if (check) {
37+
Destroy(check);
38+
}
39+
}
40+
}
41+
42+
43+
public class HideMB : MonoBehaviour {
44+
45+
private void Update() {
46+
if (HideHInterface.ToggleKey.IsDown()) {
47+
foreach (Canvas ui in FindObjectsOfType<Canvas>()) {
48+
if (ui.name == "Canvas") {
49+
ui.enabled = !ui.enabled;
50+
}
51+
}
52+
}
53+
}
54+
}
55+
}
56+
57+

HideHInterface/HideHInterface.csproj

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{ADA27C55-A00A-4BE3-AFA2-1B40B3FDED3D}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>HideHInterface</RootNamespace>
11+
<AssemblyName>HideHInterface</AssemblyName>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="Assembly-CSharp">
35+
<HintPath>..\..\..\..\..\Crap\Koikatu_Data\Managed\Assembly-CSharp.dll</HintPath>
36+
</Reference>
37+
<Reference Include="BepInEx">
38+
<HintPath>..\..\..\..\..\Crap\BepInEx\core\BepInEx.dll</HintPath>
39+
</Reference>
40+
<Reference Include="ConfigurationManager">
41+
<HintPath>..\..\..\..\..\Crap\BepInEx\ConfigurationManager.dll</HintPath>
42+
</Reference>
43+
<Reference Include="ConfigurationManagerKK">
44+
<HintPath>..\..\..\..\..\Crap\BepInEx\ConfigurationManagerKK.dll</HintPath>
45+
</Reference>
46+
<Reference Include="System" />
47+
<Reference Include="System.Core" />
48+
<Reference Include="System.Xml.Linq" />
49+
<Reference Include="System.Data.DataSetExtensions" />
50+
<Reference Include="System.Data" />
51+
<Reference Include="System.Xml" />
52+
<Reference Include="UnityEngine">
53+
<HintPath>..\..\..\..\..\Crap\Koikatu_Data\Managed\UnityEngine.dll</HintPath>
54+
</Reference>
55+
</ItemGroup>
56+
<ItemGroup>
57+
<Compile Include="HideHInterface.cs" />
58+
<Compile Include="Properties\AssemblyInfo.cs" />
59+
</ItemGroup>
60+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
61+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("HideHInterface")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("HideHInterface")]
13+
[assembly: AssemblyCopyright("Copyright © 2019")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("ada27c55-a00a-4be3-afa2-1b40b3fded3d")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)