Skip to content

Commit

Permalink
Added ClearInputLocks.dll
Browse files Browse the repository at this point in the history
This adds the ClearInputLocks to the F7 key so you no longer have to go into the ALT-F12 menu
  • Loading branch information
pap1723 committed Jan 30, 2019
1 parent 6674fdd commit 1f98745
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ClearInputLocks/ClearInputLocks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using KSP;

namespace ClearInputLocks.RP0
{
[KSPScenario(ScenarioCreationOptions.AddToAllGames, new GameScenes[] { GameScenes.EDITOR, GameScenes.FLIGHT, GameScenes.SPACECENTER, GameScenes.TRACKSTATION })]
public class ClearInputLocks : ScenarioModule
{
public void Update()
{
if (Input.GetKeyDown(KeyCode.F7))
{
InputLockManager.ClearControlLocks();
// Debug.Log("Input Locks Cleared");
}
}
}
}
57 changes: 57 additions & 0 deletions ClearInputLocks/ClearInputLocks.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{25CFD266-ED2F-47CD-AF33-4365C8D381E5}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>ClearInputLocks</RootNamespace>
<AssemblyName>ClearInputLocks</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\GameData\RP-0\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\KSP DLL\1.3.1\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\..\KSP DLL\1.3.1\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\KSP DLL\1.3.1\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ClearInputLocks.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
38 changes: 38 additions & 0 deletions ClearInputLocks/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ClearInputLocks")]
[assembly: AssemblyDescription("Simple DLL to Map ClearInputLocks from Cheat Menu to F7 key")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("KSP-RO")]
[assembly: AssemblyProduct("ClearInputLocks")]
[assembly: AssemblyCopyright("Copyright © 2019 CC-BY-NC-SA 4.0")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("25cfd266-ed2f-47cd-af33-4365c8d381e5")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

[assembly: KSPAssembly("RP-0", 1, 00)]
Binary file added GameData/RP-0/Plugins/ClearInputLocks.dll
Binary file not shown.
14 changes: 14 additions & 0 deletions Source/RP0.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RP0KCTBinder", "RP0KCTBinde
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CC_RP0", "CC_RP0\CC_RP0.csproj", "{CB4E4485-39C3-4C4A-9C24-CDD85841AA4E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClearInputLocks", "..\ClearInputLocks\ClearInputLocks.csproj", "{25CFD266-ED2F-47CD-AF33-4365C8D381E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -55,6 +57,18 @@ Global
{CB4E4485-39C3-4C4A-9C24-CDD85841AA4E}.Release|x64.Build.0 = Release|Any CPU
{CB4E4485-39C3-4C4A-9C24-CDD85841AA4E}.Release|x86.ActiveCfg = Release|Any CPU
{CB4E4485-39C3-4C4A-9C24-CDD85841AA4E}.Release|x86.Build.0 = Release|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Debug|x64.Build.0 = Debug|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Debug|x86.Build.0 = Debug|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Release|Any CPU.Build.0 = Release|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Release|x64.ActiveCfg = Release|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Release|x64.Build.0 = Release|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Release|x86.ActiveCfg = Release|Any CPU
{25CFD266-ED2F-47CD-AF33-4365C8D381E5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 1f98745

Please sign in to comment.