diff --git a/.vs/KRnD/v16/Server/sqlite3/storage.ide b/.vs/KRnD/v16/Server/sqlite3/storage.ide
index 8ae504f..9114eeb 100644
Binary files a/.vs/KRnD/v16/Server/sqlite3/storage.ide and b/.vs/KRnD/v16/Server/sqlite3/storage.ide differ
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 6afc007..f62d3bc 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,5 +1,9 @@
Changelog
+1.16.0.2
+ Moved initialization of GUIStyles into Start
+ Made window 70 pixels higher, thanks to @leatherneck6017 for the change
+
1.16.0.1
Fixed index out of range
diff --git a/GameData/KRnD/KRnD.version b/GameData/KRnD/KRnD.version
index 318b62a..88e6bda 100644
--- a/GameData/KRnD/KRnD.version
+++ b/GameData/KRnD/KRnD.version
@@ -11,7 +11,7 @@
"MAJOR": 1,
"MINOR": 16,
"PATCH": 0,
- "BUILD": 1
+ "BUILD": 2
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
diff --git a/KRnD.version b/KRnD.version
index 318b62a..88e6bda 100644
--- a/KRnD.version
+++ b/KRnD.version
@@ -11,7 +11,7 @@
"MAJOR": 1,
"MINOR": 16,
"PATCH": 0,
- "BUILD": 1
+ "BUILD": 2
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
diff --git a/Source/AssemblyVersion.cs b/Source/AssemblyVersion.cs
index 3714c32..d8f6769 100644
--- a/Source/AssemblyVersion.cs
+++ b/Source/AssemblyVersion.cs
@@ -5,4 +5,4 @@
using System.Reflection;
- [assembly: AssemblyVersion("1.16.0.1")]
+ [assembly: AssemblyVersion("1.16.0.2")]
diff --git a/Source/KRnDGUI.cs b/Source/KRnDGUI.cs
index 8044c39..d39fa1e 100644
--- a/Source/KRnDGUI.cs
+++ b/Source/KRnDGUI.cs
@@ -17,14 +17,12 @@ namespace KRnD
[KSPAddon(KSPAddon.Startup.EditorAny, false)]
public class KRnDGUI : UnityEngine.MonoBehaviour
{
- // TODO: The Application-Button shows up during the flight scene ...
- //private static ApplicationLauncherButton button = null;
public static Rect windowPosition = new Rect(300, 60, 450, 400);
- private static GUIStyle windowStyle = new GUIStyle(HighLogic.Skin.window) { fixedWidth = 500f, fixedHeight = 300f };
- private static GUIStyle labelStyle = new GUIStyle(HighLogic.Skin.label);
- private static GUIStyle labelStyleSmall = new GUIStyle(HighLogic.Skin.label) { fontSize = 10 };
- private static GUIStyle buttonStyle = new GUIStyle(HighLogic.Skin.button);
- private static GUIStyle scrollStyle = new GUIStyle(HighLogic.Skin.scrollView);
+ private static GUIStyle windowStyle;
+ private static GUIStyle labelStyle;
+ private static GUIStyle labelStyleSmall;
+ private static GUIStyle buttonStyle;
+ private static GUIStyle scrollStyle;
private static Vector2 scrollPos = Vector2.zero;
// private static Texture2D texture = null;
private static bool showGui = false;
@@ -40,13 +38,18 @@ public class KRnDGUI : UnityEngine.MonoBehaviour
void Awake()
{
-
+ windowPosition = new Rect(300, 60, 450, 400);
+ windowStyle = new GUIStyle(HighLogic.Skin.window) { fixedWidth = 500f, fixedHeight = 370 };
+ labelStyle = new GUIStyle(HighLogic.Skin.label);
+ labelStyleSmall = new GUIStyle(HighLogic.Skin.label) { fontSize = 10 };
+ buttonStyle = new GUIStyle(HighLogic.Skin.button);
+ scrollStyle = new GUIStyle(HighLogic.Skin.scrollView);
+ scrollPos = Vector2.zero;
ReadyEvent();
}
- // Fires when a scene is ready so we can install our button.
public void ReadyEvent()
{
if (toolbarControl != null)
@@ -407,7 +410,7 @@ private String getPartInfo(Part part, KRnDUpgrade upgradesToApply = null)
for (int i = 0; i < fuelResources.Count; i++)
{
PartResource fuelResource = fuelResources[i];
-
+
// Reformat resource-names like "ElectricCharge" to "Electric Charge":
String fuelName = fuelResource.resourceName.ToString();
fuelName = Regex.Replace(fuelName, @"([a-z])([A-Z])", "$1 $2");
@@ -422,7 +425,7 @@ private String getPartInfo(Part part, KRnDUpgrade upgradesToApply = null)
for (int i = 0; i < engineModules.Count; i++)
{
ModuleEngines engineModule = engineModules[i];
-
+
info += "Engine";
if (engineModules.Count > 1) info += " (" + engineModule.engineID.ToString() + ")";
info += ":\n" + engineModule.GetInfo();
@@ -439,7 +442,7 @@ private String getPartInfo(Part part, KRnDUpgrade upgradesToApply = null)
for (int i = 0; i < converterModules.Count; i++)
{
ModuleResourceConverter converterModule = converterModules[i];
-
+
info += "Converter " + converterModule.ConverterName + ":\n" + converterModule.GetInfo() + "\n";
}
}
@@ -855,7 +858,7 @@ private void OnWindow(int windowId)
if (m.moduleName == "R&D")
{
AvailablePart.ModuleInfo info = m;
- m.info = KRnDModule.GetInfo(part) ;
+ m.info = KRnDModule.GetInfo(part);
break;
}
}