Preliminary new references, usings, and code changes to compile for KSP 1.1.
Preliminary new references, usings, and code changes to compile for KSP 1.1.

--- a/API/IVOID_Module.cs
+++ b/API/IVOID_Module.cs
@@ -38,7 +38,7 @@
 		bool InValidScene { get; }
 		bool InValidGame { get; }
 
-		void DrawGUI();
+		void DrawGUI(object sender);
 		void StartGUI();
 		void StopGUI();
 

--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -29,6 +29,7 @@
 using KerbalEngineer.VesselSimulator;
 using KSP;
 using System;
+using System.Linq;
 using System.Collections.Generic;
 using UnityEngine;
 
@@ -72,8 +73,31 @@
 		public abstract event VOIDEventHandler onApplicationQuit;
 		public abstract event VOIDEventHandler onSkinChanged;
 		public abstract event VOIDEventHandler onUpdate;
+		public virtual event VOIDEventHandler onGui;
+		public virtual event VOIDEventHandler onPostRender;
 
-		public virtual void OnGUI() {}
+		public virtual bool MethodInPostRenderQueue(VOIDEventHandler method)
+		{
+			if (this.onGui != null)
+			{
+				ToadicusTools.Logging.PostDebugMessage(this, "Looking for method {0} in onGui", method);
+
+				foreach (var invoker in this.onGui.GetInvocationList())
+				{
+					ToadicusTools.Logging.PostDebugMessage(this, "Checking invoker {0}", invoker);
+
+					if (invoker == method)
+					{
+						return true;
+					}
+				}
+			}
+
+			return false;
+		}
+
+		public abstract void OnGUI();
+		public abstract void OnPostRender();
 
 		public abstract void SaveConfig();
 

--- a/API/VOIDMaster.cs
+++ b/API/VOIDMaster.cs
@@ -107,6 +107,16 @@
 			this.Core.OnGUI();
 		}
 
+		public virtual void OnPostRender()
+		{
+			if (this.Core == null)
+			{
+				return;
+			}
+
+			this.Core.OnPostRender();
+		}
+
 		public virtual void OnDestroy()
 		{
 			if (this.Core == null)

--- a/API/VOID_HUDModule.cs
+++ b/API/VOID_HUDModule.cs
@@ -91,7 +91,7 @@
 			this.Windows = new List<HUDWindow>();
 		}
 
-		public override void DrawGUI()
+		public override void DrawGUI(object sender)
 		{
 			VOID_Styles.labelHud.normal.textColor = textColors [ColorIndex];
 

--- a/API/VOID_Module.cs
+++ b/API/VOID_Module.cs
@@ -70,7 +70,7 @@
 		{
 			get
 			{
-				if (
+				/*if (
 					RenderingManager.fetch == null ||
 					RenderingManager.fetch.postDrawQueue == null ||
 					RenderingManager.fetch.postDrawQueue.Length < 4
@@ -87,7 +87,8 @@
 					}
 
 					return callback.GetInvocationList().Contains((Callback)this.DrawGUI);
-				}
+				}*/
+				return this.core != null && this.core.MethodInPostRenderQueue(this.DrawGUI);
 			}
 		}
 
@@ -232,7 +233,8 @@
 			}
 
 			ToadicusTools.Logging.PostDebugMessage (string.Format("Adding {0} to the draw queue.", this.GetType().Name));
-			RenderingManager.AddToPostDrawQueue (3, this.DrawGUI);
+			// RenderingManager.AddToPostDrawQueue (3, this.DrawGUI);
+			this.core.onGui += this.DrawGUI;
 		}
 
 		public virtual void StopGUI()
@@ -242,10 +244,10 @@
 				return;
 			}
 			ToadicusTools.Logging.PostDebugMessage (string.Format("Removing {0} from the draw queue.", this.GetType().Name));
-			RenderingManager.RemoveFromPostDrawQueue (3, this.DrawGUI);
-		}
-
-		public abstract void DrawGUI();
+			this.core.onGui -= this.DrawGUI;
+		}
+
+		public abstract void DrawGUI(object sender);
 
 		public virtual void DrawConfigurables() {}
 
@@ -509,7 +511,7 @@
 			GUI.DragWindow();
 		}
 
-		public override void DrawGUI()
+		public override void DrawGUI(object sender)
 		{
 			GUI.skin = this.core.Skin;
 

--- a/API/VOID_SingletonCore.cs
+++ b/API/VOID_SingletonCore.cs
@@ -25,7 +25,9 @@
 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 using System;
+using UnityEngine;
 
 namespace VOID
 {

--- a/Tools/VOID_DataValue.cs
+++ b/Tools/VOID_DataValue.cs
@@ -335,9 +335,9 @@
 		public VOID_StrValue(string Label, Func<string> ValueFunc) : base(Label, ValueFunc, "") {}
 	}
 
-	public class VOID_Vector3dValue : VOID_DataValue<Vector3d>
-	{
-		public VOID_Vector3dValue(string Label, Func<Vector3d> ValueFunc, string Units)
+	public class VOID_Vector3Value : VOID_DataValue<Vector3>
+	{
+		public VOID_Vector3Value(string Label, Func<Vector3> ValueFunc, string Units)
 			: base(Label, ValueFunc, Units)
 		{}
 

--- a/Tools/VOID_SaveValue.cs
+++ b/Tools/VOID_SaveValue.cs
@@ -68,11 +68,9 @@
 				{
 					ToadicusTools.Logging.PostDebugMessage (string.Format (
 						"VOID: Dirtying config for type {0}." +
-						"\n\t Old Value: {2}, New Value: {3}" +
-						"\n\t Object.Equals(New, Old): {4}\n" +
-						"{1}",
+						"\n\t Old Value: {1}, New Value: {2}" +
+						"\n\t Object.Equals(New, Old): {3}\n" +
 						this._type,
-						new System.Diagnostics.StackTrace().ToString(),
 						this._value,
 						value,
 						System.Object.Equals(this._value, value)

--- a/Tools/VOID_Tools.cs
+++ b/Tools/VOID_Tools.cs
@@ -704,8 +704,8 @@
 
 		public static double mrenigma03_calcphase(Vessel vessel, CelestialBody target)   //calculates phase angle between the current body and target body
 		{
-			Vector3d vecthis = new Vector3d();
-			Vector3d vectarget = new Vector3d();
+			Vector3 vecthis = new Vector3();
+			Vector3 vectarget = new Vector3();
 			vectarget = target.orbit.getRelativePositionAtUT(Planetarium.GetUniversalTime());
 
 			if ((vessel.mainBody.name == "Sun") || (vessel.mainBody.referenceBody.referenceBody.name == "Sun"))
@@ -717,15 +717,15 @@
 				vecthis = vessel.mainBody.orbit.getRelativePositionAtUT(Planetarium.GetUniversalTime());
 			}
 
-			vecthis = Vector3d.Project(new Vector3d(vecthis.x, 0, vecthis.z), vecthis);
-			vectarget = Vector3d.Project(new Vector3d(vectarget.x, 0, vectarget.z), vectarget);
-
-			Vector3d prograde = new Vector3d();
-			prograde = Quaternion.AngleAxis(90, Vector3d.forward) * vecthis;
-
-			double phase = Vector3d.Angle(vecthis, vectarget);
-
-			if (Vector3d.Angle(prograde, vectarget) > 90)
+			vecthis = Vector3.Project(new Vector3(vecthis.x, 0, vecthis.z), vecthis);
+			vectarget = Vector3.Project(new Vector3(vectarget.x, 0, vectarget.z), vectarget);
+
+			Vector3 prograde = new Vector3();
+			prograde = Quaternion.AngleAxis(90, Vector3.forward) * vecthis;
+
+			double phase = Vector3.Angle(vecthis, vectarget);
+
+			if (Vector3.Angle(prograde, vectarget) > 90)
 				phase = 360 - phase;
 
 			return (phase + 360) % 360;

--- a/VOID.csproj
+++ b/VOID.csproj
@@ -136,6 +136,15 @@
     <Reference Include="UnityEngine">
       <HintPath>..\_KSPAssemblies\UnityEngine.dll</HintPath>
     </Reference>
+    <Reference Include="KSPUtil">
+      <HintPath>..\_KSPAssemblies\KSPUtil.dll</HintPath>
+    </Reference>
+    <Reference Include="UnityEngine.UI">
+      <HintPath>..\_KSPAssemblies\UnityEngine.UI.dll</HintPath>
+    </Reference>
+    <Reference Include="Assembly-CSharp-firstpass">
+      <HintPath>..\_KSPAssemblies\Assembly-CSharp-firstpass.dll</HintPath>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\ToadicusTools\ToadicusTools.csproj">

--- a/VOIDCore_Generic.cs
+++ b/VOIDCore_Generic.cs
@@ -30,6 +30,7 @@
 using KerbalEngineer.Helpers;
 using KerbalEngineer.VesselSimulator;
 using KSP;
+using KSP.UI.Screens;
 using System;
 using System.Collections.Generic;
 using System.Text;
@@ -319,11 +320,13 @@
 		public override event VOIDEventHandler onApplicationQuit;
 		public override event VOIDEventHandler onSkinChanged;
 		public override event VOIDEventHandler onUpdate;
+		public override event VOIDEventHandler onGui;
+		public override event VOIDEventHandler onPostRender;
 
 		/*
 		 * Methods
 		 * */
-		public override void DrawGUI()
+		public override void DrawGUI(object sender)
 		{
 			this.windowID = this.windowBaseID;
 
@@ -362,7 +365,7 @@
 
 			if (this.Active)
 			{
-				base.DrawGUI();
+				base.DrawGUI(sender);
 			}
 		}
 
@@ -525,6 +528,24 @@
 			}
 		}
 
+		public override void OnGUI()
+		{
+			Logging.PostDebugMessage(this, "In OnGUI");
+			if (this.onGui != null)
+			{
+				this.onGui(this);
+			}
+		}
+
+		public override void OnPostRender()
+		{
+			Logging.PostDebugMessage(this, "In OnPostRender");
+			if (this.onPostRender != null)
+			{
+				this.onPostRender(this);
+			}
+		}
+
 		public void OnDestroy()
 		{
 			IVOID_Module module;
@@ -555,7 +576,9 @@
 		{
 			if (!this.GUIRunning)
 			{
-				RenderingManager.AddToPostDrawQueue(3, this.DrawGUI);
+				// RenderingManager.AddToPostDrawQueue(3, this.DrawGUI);
+				Logging.PostDebugMessage(this, "Adding DrawGUI to onGui");
+				this.onGui += this.DrawGUI;
 			}
 		}
 

--- a/VOID_CareerStatus.cs
+++ b/VOID_CareerStatus.cs
@@ -136,14 +136,14 @@
 			}
 		}
 
-		public override void DrawGUI()
+		public override void DrawGUI(object sender)
 		{
 			if (Event.current.type != EventType.Layout && !this.currenciesInitialized)
 			{
 				this.initCurrencies();
 			}
 
-			base.DrawGUI();
+			base.DrawGUI(sender);
 		}
 
 		public override void ModuleWindow(int id)

--- a/VOID_Data.cs
+++ b/VOID_Data.cs
@@ -486,20 +486,20 @@
 				""
 			);
 
-		public static readonly VOID_Vector3dValue vesselThrustOffset =
-			new VOID_Vector3dValue(
+		public static readonly VOID_Vector3Value vesselThrustOffset =
+			new VOID_Vector3Value(
 				"Thrust Offset",
 				delegate()
 				{
 					if (Core.Vessel == null)
 					{
-						return Vector3d.zero;
+						return Vector3.zero;
 					}
 
 					IList<PartModule> engineModules = Core.Vessel.getModulesOfType<PartModule>();
 
-					Vector3d thrustPos = Vector3d.zero;
-					Vector3d thrustDir = Vector3d.zero;
+					Vector3 thrustPos = Vector3.zero;
+					Vector3 thrustDir = Vector3.zero;
 					float thrust = 0;
 
 					PartModule engine;
@@ -562,7 +562,7 @@
 					thrustPos = vesselTransform.InverseTransformPoint(thrustPos);
 					thrustDir = vesselTransform.InverseTransformDirection(thrustDir);
 
-					Vector3d thrustOffset = VectorTools.PointDistanceToLine(
+					Vector3 thrustOffset = VectorTools.PointDistanceToLine(
 						                        thrustPos, thrustDir.normalized, Core.Vessel.findLocalCenterOfMass());
 
 					Logging.PostDebugMessage(typeof(VOID_Data), "vesselThrustOffset:\n" +

--- a/VOID_EditorHUD.cs
+++ b/VOID_EditorHUD.cs
@@ -110,7 +110,7 @@
 			this.ehudWindow = new HUDWindow(
 				"editorHUD",
 				this.ehudWindowFunc,
-				new Rect(EditorPanels.Instance.partsPanelWidth + 10f, 125f, 300f, 64f)
+				new Rect(/*EditorPanels.Instance.partsPanelWidth + */10f, 125f, 300f, 64f)
 			);
 			this.Windows.Add(this.ehudWindow);
 
@@ -196,27 +196,27 @@
 			}
 		}
 
-		public override void DrawGUI()
+		public override void DrawGUI(object sender)
 		{
 			float hudLeft;
 
 			if (EditorLogic.fetch.editorScreen == EditorScreen.Parts)
 			{
-				hudLeft = EditorPanels.Instance.partsPanelWidth + 10f;
-				hudLeft += EditorPartList.Instance.transformTopLeft.position.x -
-					EditorPartList.Instance.transformTopLeft.parent.parent.position.x -
+				hudLeft = /*EditorPanels.Instance.partsPanelWidth + */10f;
+				hudLeft += /*EditorPartList.Instance.transformTopLeft.position.x -*/
+					/*EditorPartList.Instance.transformTopLeft.parent.parent.position.x -*/
 					72f;
 			}
 			else if (EditorLogic.fetch.editorScreen == EditorScreen.Actions)
 			{
-				hudLeft = EditorPanels.Instance.actionsPanelWidth + 10f;
+				hudLeft = /*EditorPanels.Instance.actionsPanelWidth +*/ 10f;
 			}
 			else
 			{
 				return;
 			}
 
-			Logging.PostDebugMessage(this,
+			/*Logging.PostDebugMessage(this,
 				"EditorPartList topLeft.parent.parent.position: {0}\n" +
 				"EditorPartList topLeft.parent.position: {1}\n" +
 				"EditorPartList topLeft.position: {2}\n" +
@@ -225,9 +225,9 @@
 				EditorPartList.Instance.transformTopLeft.parent.position,
 				EditorPartList.Instance.transformTopLeft.position,
 				this.snapToLeft, this.ehudWindow.WindowPos.xMin, hudLeft
-			);
-
-			base.DrawGUI();
+			);*/
+
+			base.DrawGUI(this);
 
 			Rect hudPos = this.ehudWindow.WindowPos;
 

--- a/VOID_HUDAdvanced.cs
+++ b/VOID_HUDAdvanced.cs
@@ -80,7 +80,7 @@
 			this.leftHUD = new HUDWindow("leftHUD",
 				this.leftHUDWindow,
 				new Rect(
-					Screen.width * .5f - (float)GameSettings.UI_SIZE * .25f - 300f,
+					Screen.width * .5f - (float)GameSettings.UI_SCALE * .25f - 300f,
 					Screen.height - 200f,
 					300f, 90f)
 			);
@@ -90,7 +90,7 @@
 				"rightHUD",
 				this.rightHUDWindow,
 				new Rect(
-					Screen.width * .5f + (float)GameSettings.UI_SIZE * .25f,
+					Screen.width * .5f + (float)GameSettings.UI_SCALE * .25f,
 					Screen.height - 200f,
 					300f, 90f)
 			);
@@ -227,7 +227,7 @@
 			}
 		}
 
-		public override void DrawGUI()
+		public override void DrawGUI(object sender)
 		{
 			if (this.primaryHUD == null)
 			{
@@ -252,7 +252,7 @@
 				this.Windows.Add(this.rightHUD);
 			}
 
-			base.DrawGUI();
+			base.DrawGUI(sender);
 		}
 
 		public override void DrawConfigurables()

--- a/VOID_Rendezvous.cs
+++ b/VOID_Rendezvous.cs
@@ -185,7 +185,7 @@
 					{
 						GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 						GUILayout.Label("Relative inclination:");
-						GUILayout.Label(Vector3d.Angle(Vessel.orbit.GetOrbitNormal(), v.orbit.GetOrbitNormal()).ToString("F3") + "°", GUILayout.ExpandWidth(false));
+						GUILayout.Label(Vector3.Angle(Vessel.orbit.GetOrbitNormal(), v.orbit.GetOrbitNormal()).ToString("F3") + "°", GUILayout.ExpandWidth(false));
 						GUILayout.EndHorizontal();
 					}
 					//if (debugging) Debug.Log("[CHATR] v -> v relative incl OK");
@@ -297,7 +297,7 @@
 				{
 					GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 					GUILayout.Label("Relative inclination:");
-					GUILayout.Label(Vector3d.Angle(Vessel.orbit.GetOrbitNormal(), cb.orbit.GetOrbitNormal()).ToString("F3") + "°", GUILayout.ExpandWidth(false));
+					GUILayout.Label(Vector3.Angle(Vessel.orbit.GetOrbitNormal(), cb.orbit.GetOrbitNormal()).ToString("F3") + "°", GUILayout.ExpandWidth(false));
 					GUILayout.EndHorizontal();
 					//if (debugging) Debug.Log("[VOID] cb Relative inclination OK");
 				}

--- a/VOID_StageInfo.cs
+++ b/VOID_StageInfo.cs
@@ -116,9 +116,9 @@
 			);
 		}
 
-		public override void DrawGUI()
-		{
-			base.DrawGUI();
+		public override void DrawGUI(object sender)
+		{
+			base.DrawGUI(sender);
 
 			if (this.showBodyList)
 			{