Skip to content

Commit

Permalink
Updated for 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxgurugamer committed Mar 14, 2018
1 parent f795674 commit 8b3b519
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 23 deletions.
Binary file modified .vs/ClickThroughBlocker/v15/sqlite3/storage.ide
Binary file not shown.
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.1.3
Rebuildt for 1.4.1

0.1.2
Added code to work around stock bug where the editor ignores the lock when the ActionGroup pane is shown

Expand Down
12 changes: 10 additions & 2 deletions ClickThroughBlocker.version
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{

"NAME": "ClickThroughBlocker",
"URL" : "https://raw.githubusercontent.com/linuxgurugamer/ClickThroughBlocker/master/ClickThroughBlocker.version",
"DOWNLOAD" : "https://github.com/linuxgurugamer/ClickThroughBlocker/releases",
"GITHUB" :
{
"USERNAME" : "linuxgurugamer",
"REPOSITORY" : "ClickThroughBlocker"
},
"URL": "http://ksp-avc.cybutek.net/version.php?id=546",
"VERSION": {
"MAJOR": 0,
"MINOR": 1,
"PATCH": 2,
"PATCH": 3,
"BUILD": 0
},
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 3,
"MINOR": 4,
"PATCH": 1
}
}
2 changes: 1 addition & 1 deletion ClickThroughBlocker/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

using System.Reflection;

[assembly: AssemblyVersion("0.1.2.0")]
[assembly: AssemblyVersion("0.1.3.0")]
172 changes: 172 additions & 0 deletions ClickThroughBlocker/ClickThroughBlocker.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Reflection;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using KSP.UI.Screens;
using UnityEngine.EventSystems;


namespace ClickThroughFix
Expand Down Expand Up @@ -194,6 +196,176 @@ public static Rect GUIWindow(int id, Rect clientRect, GUI.WindowFunction func, G
Rect r = GUI.Window(id, clientRect, func, title, style);
return UpdateList(id, r, title.ToString());
}


#if false

static bool fieldHasFocus()
{
GameObject obj;
bool inputFieldIsFocused;
// First check for a text field ???
// Ignore keystrokes when a text field has focus (e.g. part search, craft title box)
obj = EventSystem.current.currentSelectedGameObject;
inputFieldIsFocused = (obj != null && obj.GetComponent<InputField>() != null && obj.GetComponent<InputField>().isFocused);
//if (inputFieldIsFocused)
//return false;

//inputFieldIsFocused = (inputObj != null && inputObj.GetComponent<InputField>() != null && inputObj.GetComponent<InputField>().isFocused);

return inputFieldIsFocused;
}

// GUI.TextArea
public static string GUITextArea(Rect position, string text)
{
string t = text;
text = GUI.TextArea(position, text);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUITextArea(Rect position, string text, int maxLength)
{
string t = text;
text = GUI.TextArea(position, text, maxLength);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUITextArea(Rect position, string text, GUIStyle style)
{
string t = text;
text = GUI.TextArea(position, text, style);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUITextArea(Rect position, string text, int maxLength, GUIStyle style)
{
string t = text;
text = GUI.TextArea(position, text, maxLength, style);
if (!fieldHasFocus())
return t;
return text;
}

// GUI.TextField
public static string GUITextField(Rect position, string text, GUIStyle style)
{
string t = text;
text = GUI.TextField(position, text, style);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUITextField(Rect position, string text, int maxLength)
{
string t = text;
text = GUI.TextField(position, text, maxLength);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUITextField(Rect position, string text)
{
string t = text;
text = GUI.TextField(position, text);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUITextField(Rect position, string text, int maxLength, GUIStyle style)
{
string t = text;
text = GUI.TextField(position, text, maxLength, style);
if (!fieldHasFocus())
return t;
return text;
}

// GUILayout.TextArea

public static string GUILayoutTextArea(string text, int maxLength, GUIStyle style, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextArea(text, maxLength, style, options);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUILayoutTextArea(string text, GUIStyle style, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextArea(text, style, options);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUILayoutTextArea(string text, int maxLength, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextArea(text, maxLength, options);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUILayoutTextArea(string text, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextArea(text, options);
if (!fieldHasFocus())
return t;
return text;
}

// GUILayout.TextField

public static string GUILayoutTextField(string text, int maxLength, GUIStyle style, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextField(text, maxLength, style, options);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUILayoutTextField(string text, GUIStyle style, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextField(text, style, options);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUILayoutTextField(string text, int maxLength, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextField(text, maxLength, options);
if (!fieldHasFocus())
return t;
return text;
}

public static string GUILayoutTextField(string text, params GUILayoutOption[] options)
{
string t = text;
text = GUILayout.TextField(text, options);
if (!fieldHasFocus())
return t;
return text;
}
#endif
}

[KSPAddon(KSPAddon.Startup.Flight, true)]
Expand Down
36 changes: 19 additions & 17 deletions ClickThroughBlocker/ClickThroughBlocker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>R:\KSP_1.3.1_dev\KSP_x64_Data\Managed\Assembly-CSharp.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="UnityEngine">
<HintPath>R:\KSP_1.3.1_dev\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>R:\KSP_1.3.1_dev\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyVersion.cs">
<AutoGen>True</AutoGen>
Expand All @@ -66,6 +49,25 @@
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.4.1_dev\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.4.1_dev\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.4.1_dev\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.4.1_dev\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
Expand Down
12 changes: 10 additions & 2 deletions GameData/ClickThroughBlocker/ClickThroughBlocker.version
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{

"NAME": "ClickThroughBlocker",
"URL" : "https://raw.githubusercontent.com/linuxgurugamer/ClickThroughBlocker/master/ClickThroughBlocker.version",
"DOWNLOAD" : "https://github.com/linuxgurugamer/ClickThroughBlocker/releases",
"GITHUB" :
{
"USERNAME" : "linuxgurugamer",
"REPOSITORY" : "ClickThroughBlocker"
},
"URL": "http://ksp-avc.cybutek.net/version.php?id=546",
"VERSION": {
"MAJOR": 0,
"MINOR": 1,
"PATCH": 2,
"PATCH": 3,
"BUILD": 0
},
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 3,
"MINOR": 4,
"PATCH": 1
}
}
2 changes: 1 addition & 1 deletion deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rem GAMEDATA is the name of the local GameData
rem VERSIONFILE is the name of the version file, usually the same as GAMEDATA,
rem but not always

set H=R:\KSP_1.3.1_dev
set H=R:\KSP_1.4.1_dev
set GAMEDIR=ClickThroughBlocker
set GAMEDATA="GameData\"
set VERSIONFILE=%GAMEDIR%.version
Expand Down

0 comments on commit 8b3b519

Please sign in to comment.