Changed up the window modules to inherit the generic stuff. Adding more and more modules. CBInfoBrowser in progress.
[VOID.git] / VOID_VesselInfo.cs
blob:a/VOID_VesselInfo.cs -> blob:b/VOID_VesselInfo.cs
--- a/VOID_VesselInfo.cs
+++ b/VOID_VesselInfo.cs
@@ -24,11 +24,8 @@
 
 namespace VOID
 {
-	public class VOID_VesselInfo : VOID_Module
+	public class VOID_VesselInfo : VOID_WindowModule
 	{
-		[AVOID_SaveValue("WindowPos")]
-		protected Rect WindowPos = new Rect(Screen.width / 2, Screen.height / 2, 10f, 10f);
-
 		[AVOID_SaveValue("toggleExtended")]
 		protected VOID_SaveValue<bool> toggleExtended = false;
 
@@ -37,7 +34,7 @@
 			this._Name = "Vessel Information";
 		}
 
-		public void ModuleWindow(int _)
+		public override void ModuleWindow(int _)
 		{
 			if ((TimeWarp.WarpMode == TimeWarp.Modes.LOW) || (TimeWarp.CurrentRate <= TimeWarp.MaxPhysicsRate))
 			{
@@ -139,24 +136,6 @@
 			GUILayout.EndVertical();
 			GUI.DragWindow();
 		}
-
-		public override void DrawGUI()
-		{
-			Rect _Pos = this.WindowPos;
-
-			_Pos = GUILayout.Window(
-				VOID_Core.Instance.windowID,
-				_Pos,
-				this.ModuleWindow,
-				this.Name, GUILayout.Width(250),
-				GUILayout.Height(50));
-
-			if (_Pos != this.WindowPos)
-			{
-				this.WindowPos = _Pos;
-				VOID_Core.Instance.configDirty = true;
-			}
-		}
 	}
 }