VOID_Core: Wrapped some of the flight-specific things in HighLogic.LoadedSceneIs
VOID_Core: Wrapped some of the flight-specific things in HighLogic.LoadedSceneIs
Editor checks.
VOID_EditorCore: Disable icon relocation; clamp to window instead.

--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -431,12 +431,16 @@
 		{
 			GUILayout.BeginVertical();
 			
-			if (this.powerAvailable)
-			{
-				string str = "ON";
-				if (togglePower) str = "OFF";
-				if (GUILayout.Button("Power " + str)) togglePower = !togglePower;
-			    if (togglePower)
+			if (this.powerAvailable || HighLogic.LoadedSceneIsEditor)
+			{
+				if (!HighLogic.LoadedSceneIsEditor)
+				{
+					string str = "ON";
+					if (togglePower) str = "OFF";
+					if (GUILayout.Button("Power " + str)) togglePower = !togglePower;
+				}
+
+				if (togglePower || HighLogic.LoadedSceneIsEditor)
 			    {
 					foreach (IVOID_Module module in this.Modules)
 					{
@@ -470,9 +474,12 @@
 
 		public override void DrawConfigurables()
 		{
-			this.consumeResource = GUILayout.Toggle (this.consumeResource, "Consume Resources");
-
-			this.VOIDIconLocked = GUILayout.Toggle (this.VOIDIconLocked, "Lock Icon Position");
+			if (HighLogic.LoadedSceneIsFlight)
+			{
+				this.consumeResource = GUILayout.Toggle (this.consumeResource, "Consume Resources");
+
+				this.VOIDIconLocked = GUILayout.Toggle (this.VOIDIconLocked, "Lock Icon Position");
+			}
 
 			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 
@@ -515,18 +522,23 @@
 
 		public void OnGUI()
 		{
-			if (Event.current.type == EventType.Layout || Event.current.type == EventType.Repaint)
+			if (Event.current.type == EventType.Repaint)
 			{
 				return;
 			}
 
 			Tools.PostDebugMessage(string.Format(
 				"Event.current.type: {0}" +
-				"this.VOIDIconLocked: {1}" +
-				"Event.current.mousePosition: {2}",
+				"\nthis.VOIDIconLocked: {1}" +
+				"\nEvent.current.mousePosition: {2}" +
+				"\nVOIDIconPos: ({3}, {4}),({5}, {6})",
 				Event.current.type,
 				this.VOIDIconLocked,
-				Event.current.mousePosition
+				Event.current.mousePosition,
+				this.VOIDIconPos.value.xMin,
+				this.VOIDIconPos.value.yMin,
+				this.VOIDIconPos.value.xMax,
+				this.VOIDIconPos.value.yMax
 				));
 
 			if (!this.VOIDIconLocked &&

--- a/VOID_EditorCore.cs
+++ b/VOID_EditorCore.cs
@@ -68,15 +68,35 @@
 		public VOID_EditorCore() : base()
 		{
 			this._Name = "VOID Editor Core";
+		}
 
-			this.VOIDIconPos = new Rect(Screen.width - 60, Screen.height - 30, 30, 30);
-		}
+		public new void OnGUI() {}
 
 		public override void DrawGUI()
 		{
 			if (!this._modulesLoaded)
 			{
 				this.LoadModulesOfType<IVOID_EditorModule>();
+			}
+
+			Rect _iconPos = new Rect(this.VOIDIconPos);
+			Vector2 _iconCtr = new Vector2 ();
+			_iconCtr.x = ((Rect)this.mainWindowPos).center.x;
+
+			if (this.mainWindowPos.value.center.y < Screen.height / 2)
+			{
+				_iconCtr.y = ((Rect)this.mainWindowPos).yMin - 15;
+			}
+			else
+			{
+				_iconCtr.y = ((Rect)this.mainWindowPos).yMax + 15;
+			}
+
+			_iconPos.center = _iconCtr;
+
+			if (this.VOIDIconPos != _iconPos)
+			{
+				this.VOIDIconPos = _iconPos;
 			}
 
 			base.DrawGUI();