VOID_Styles: Removed 'Ready' property because we weren't using it.
VOID_Styles: Removed 'Ready' property because we weren't using it.

--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -76,11 +76,39 @@
 		public virtual event VOIDEventHandler onPreRender;
 		public virtual event VOIDEventHandler onPostRender;
 
+		public virtual bool MethodInPreRenderQueue(VOIDEventHandler method)
+		{
+			if (this.onPreRender != null)
+			{
+				ToadicusTools.Logging.PostDebugMessage(this, "Looking in onPreRender for method {0} in onGui", method);
+
+				foreach (Delegate invoker in this.onPreRender.GetInvocationList())
+				{
+					ToadicusTools.Logging.PostDebugMessage(this, "Checking invoker {0}", invoker);
+
+					if (invoker == method)
+					{
+						ToadicusTools.Logging.PostDebugMessage(this, "Found match.");
+						return true;
+					}
+				}
+			}
+			#if DEBUG
+			else
+			{
+			ToadicusTools.Logging.PostDebugMessage(this, "this.onPreRender == null");
+			}
+			#endif
+
+
+			return false;
+		}
+
 		public virtual bool MethodInPostRenderQueue(VOIDEventHandler method)
 		{
 			if (this.onPostRender != null)
 			{
-				ToadicusTools.Logging.PostDebugMessage(this, "Looking for method {0} in onGui", method);
+				ToadicusTools.Logging.PostDebugMessage(this, "Looking in onPostRender for method {0} in onGui", method);
 
 				foreach (Delegate invoker in this.onPostRender.GetInvocationList())
 				{

--- a/API/VOID_Module.cs
+++ b/API/VOID_Module.cs
@@ -70,25 +70,6 @@
 		{
 			get
 			{
-				/*if (
-					RenderingManager.fetch == null ||
-					RenderingManager.fetch.postDrawQueue == null ||
-					RenderingManager.fetch.postDrawQueue.Length < 4
-				)
-				{
-					return false;
-				}
-				else
-				{
-					Delegate callback = RenderingManager.fetch.postDrawQueue[3];
-					if (callback == null)
-					{
-						return false;
-					}
-
-					return callback.GetInvocationList().Contains((Callback)this.DrawGUI);
-				}*/
-
 				using (var log = ToadicusTools.DebugTools.PooledDebugLogger.New(this))
 				{
 					log.AppendFormat("this.core: {0}\n", this.core != null ? this.core.ToString() : "null");
@@ -249,7 +230,6 @@
 			}
 
 			ToadicusTools.Logging.PostDebugMessage (string.Format("Adding {0} to the draw queue.", this.GetType().Name));
-			// RenderingManager.AddToPostDrawQueue (3, this.DrawGUI);
 			this.core.onPostRender += this.DrawGUI;
 		}
 

--- a/Tools/VOID_DataValue.cs
+++ b/Tools/VOID_DataValue.cs
@@ -109,8 +109,26 @@
 			return (T)this.cache;
 		}
 
-		public virtual string ValueUnitString() {
-			return this.Value.ToString() + this.Units;
+		public virtual string ValueUnitString()
+		{
+			if (this.Value == null || this.Units == null)
+			{
+				using (PooledStringBuilder sb = PooledStringBuilder.Get())
+				{
+					if (this.Value == null)
+					{
+						sb.AppendFormat("{0}: Value is null during ValueUnitString\n", this.Label);
+					}
+					if (this.Units == null)
+					{
+						sb.AppendFormat("{0}: Units is null during ValueUnitString\n", this.Label);
+					}
+
+					ToadicusTools.Logging.PostErrorMessage(sb.ToString());
+				}
+			}
+
+			return string.Format("{0}{1}", this.Value == null ? "NULL" : this.Value.ToString(), this.Units);
 		}
 
 		public virtual void DoGUIHorizontal()

--- a/VOIDCore_Generic.cs
+++ b/VOIDCore_Generic.cs
@@ -556,7 +556,6 @@
 		{
 			if (!this.GUIRunning)
 			{
-				// RenderingManager.AddToPostDrawQueue(3, this.DrawGUI);
 				Logging.PostDebugMessage(this, "Adding DrawGUI to onGui");
 				this.onPostRender += this.DrawGUI;
 			}

--- a/VOID_EditorHUD.cs
+++ b/VOID_EditorHUD.cs
@@ -28,6 +28,7 @@
 
 using KerbalEngineer.VesselSimulator;
 using KSP;
+using KSP.UI.Screens;
 using System;
 using System.Collections.Generic;
 using System.Text;
@@ -110,7 +111,7 @@
 			this.ehudWindow = new HUDWindow(
 				"editorHUD",
 				this.ehudWindowFunc,
-				new Rect(/*EditorPanels.Instance.partsPanelWidth + */10f, 125f, 300f, 64f)
+				new Rect(10f, 125f, 300f, 64f)
 			);
 			this.Windows.Add(this.ehudWindow);
 
@@ -200,32 +201,18 @@
 		{
 			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 -*/
-					72f;
-			}
-			else if (EditorLogic.fetch.editorScreen == EditorScreen.Actions)
-			{
-				hudLeft = /*EditorPanels.Instance.actionsPanelWidth +*/ 10f;
-			}
-			else
-			{
-				return;
-			}
-
-			/*Logging.PostDebugMessage(this,
-				"EditorPartList topLeft.parent.parent.position: {0}\n" +
-				"EditorPartList topLeft.parent.position: {1}\n" +
-				"EditorPartList topLeft.position: {2}\n" +
-				"snapToEdge: {3} (pos.Xmin: {4}; hudLeft: {5})",
-				EditorPartList.Instance.transformTopLeft.parent.parent.position,
-				EditorPartList.Instance.transformTopLeft.parent.position,
-				EditorPartList.Instance.transformTopLeft.position,
-				this.snapToLeft, this.ehudWindow.WindowPos.xMin, hudLeft
-			);*/
+			switch (EditorLogic.fetch.editorScreen)
+			{
+				case EditorScreen.Parts:
+					hudLeft = 16f + EditorPanels.Instance.partsEditor.panelTransform.rect.width +
+						EditorPanels.Instance.partcategorizerModes.transform.localPosition.x;
+					break;
+				case EditorScreen.Actions:
+					hudLeft = EditorPanels.Instance.actions.transform.localPosition.x + 464f;
+					break;
+				default:
+					return;
+			}
 
 			base.DrawGUI(this);
 

--- a/VOID_HUD.cs
+++ b/VOID_HUD.cs
@@ -58,10 +58,10 @@
 
 			this.Active = true;
 
-			this.leftHUD = new HUDWindow("leftHUD", this.leftHUDWindow, new Rect(Screen.width * .375f - 300f, 0f, 300f, 90f));
+			this.leftHUD = new HUDWindow("leftHUD", this.leftHUDWindow, new Rect((float)Screen.width * .375f - 300f, 0f, 300f, 90f));
 			this.Windows.Add(this.leftHUD);
 
-			this.rightHUD = new HUDWindow("rightHUD", this.rightHUDWindow, new Rect(Screen.width * .625f, 0f, 300f, 90f));
+			this.rightHUD = new HUDWindow("rightHUD", this.rightHUDWindow, new Rect((float)Screen.width * .625f, 0f, 300f, 90f));
 			this.Windows.Add(this.rightHUD);
 
 			Logging.PostDebugMessage ("VOID_HUD: Constructed.");

--- a/VOID_Styles.cs
+++ b/VOID_Styles.cs
@@ -33,12 +33,6 @@
 {
 	public static class VOID_Styles
 	{
-		public static bool Ready
-		{
-			get;
-			private set;
-		}
-
 		public static GUIStyle labelDefault
 		{
 			get;
@@ -115,17 +109,12 @@
 
 			labelGreen = new GUIStyle(GUI.skin.label);
 			labelGreen.normal.textColor = Color.green;
-
-			Ready = true;
 		}
 
 		static VOID_Styles()
 		{
 			OnSkinChanged();
-
-			Ready = false;
 		}
 	}
 }
 
-