Some tweaks to string formatting, mostly in VOID_DataValue. Also mulling some changes to the way VOID_DataValues work.
Some tweaks to string formatting, mostly in VOID_DataValue. Also mulling some changes to the way VOID_DataValues work.

--- a/API/VOID_HUDModule.cs
+++ b/API/VOID_HUDModule.cs
@@ -133,9 +133,7 @@
 				}
 			}
 
-			this.positionsLocked = GUILayout.Toggle(this.positionsLocked,
-				string.Intern("Lock HUD Positions"),
-				GUILayout.ExpandWidth(false));
+			this.positionsLocked = GUITools.Toggle(this.positionsLocked, "Lock HUD Positions");
 		}
 
 		public override void LoadConfig()

--- a/Tools/VOID_DataValue.cs
+++ b/Tools/VOID_DataValue.cs
@@ -145,9 +145,11 @@
 		}
 	}
 
-	public abstract class VOID_NumValue<T> : VOID_DataValue<T>
+	public abstract class VOID_NumValue<T> : VOID_DataValue<T>, IFormattable
 		where T : IFormattable, IConvertible, IComparable
 	{
+		public static IFormatProvider formatProvider = Tools.SIFormatter;
+
 		public static implicit operator Double(VOID_NumValue<T> v)
 		{
 			return v.ToDouble();
@@ -158,17 +160,14 @@
 			return v.ToInt32();
 		}
 
-
 		public static implicit operator Single(VOID_NumValue<T> v)
 		{
 			return v.ToSingle();
 		}
 
-		protected IFormatProvider formatProvider;
-
 		public VOID_NumValue(string Label, Func<T> ValueFunc, string Units = "") : base(Label, ValueFunc, Units)
 		{
-			this.formatProvider = System.Globalization.CultureInfo.CurrentUICulture;
+
 		}
 
 		public virtual double ToDouble(IFormatProvider provider)
@@ -178,7 +177,7 @@
 
 		public virtual double ToDouble()
 		{
-			return this.ToDouble(this.formatProvider);
+			return this.ToDouble(formatProvider);
 		}
 
 		public virtual int ToInt32(IFormatProvider provider)
@@ -188,7 +187,7 @@
 
 		public virtual int ToInt32()
 		{
-			return this.ToInt32(this.formatProvider);
+			return this.ToInt32(formatProvider);
 		}
 
 		public virtual float ToSingle(IFormatProvider provider)
@@ -198,15 +197,19 @@
 
 		public virtual float ToSingle()
 		{
-			return this.ToSingle(this.formatProvider);
-		}
-
-		public virtual string ToString(string Format)
+			return this.ToSingle(formatProvider);
+		}
+
+		public virtual string ToString(string format)
+		{
+			return this.ToString(format, formatProvider);
+		}
+
+		public virtual string ToString(string format, IFormatProvider provider)
 		{
 			return string.Format (
-				"{0}: {1}{2}",
-				this.Label,
-				this.Value.ToString(Format, this.formatProvider),
+				"{0}{1}",
+				this.Value.ToString(format, provider),
 				this.Units
 			);
 		}
@@ -222,7 +225,7 @@
 
 		public virtual string ValueUnitString(string format)
 		{
-			return this.Value.ToString(format, this.formatProvider) + this.Units;
+			return this.Value.ToString(format, formatProvider) + this.Units;
 		}
 		
 		public virtual string ValueUnitString(int digits) {

--- a/VOIDCore_Flight.cs
+++ b/VOIDCore_Flight.cs
@@ -29,6 +29,7 @@
 using KSP;
 using System;
 using UnityEngine;
+using ToadicusTools;
 
 namespace VOID
 {
@@ -44,7 +45,7 @@
 		{
 			if (HighLogic.LoadedSceneIsFlight)
 			{
-				this.consumeResource.value = GUILayout.Toggle(this.consumeResource, "Consume Resources");
+				this.consumeResource.value = GUITools.Toggle(this.consumeResource, "Consume Resources");
 			}
 
 			base.DrawConfigurables();

--- a/VOIDCore_Generic.cs
+++ b/VOIDCore_Generic.cs
@@ -118,6 +118,7 @@
 				"SSUITextAreaDefault",
 				"ExperimentsDialogSkin",
 				"ExpRecoveryDialogSkin",
+				"KSP window 1",
 				"KSP window 5",
 				"KSP window 6",
 				"PartTooltipSkin",
@@ -605,17 +606,7 @@
 				{
 					foreach (IVOID_Module module in this.Modules)
 					{
-						GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
-
-						module.toggleActive = GUILayout.Toggle(
-							module.toggleActive,
-							GUIContent.none,
-							GUILayout.ExpandWidth(false)
-						);
-
-						GUILayout.Label(module.Name, GUILayout.ExpandWidth(true));
-
-						GUILayout.EndHorizontal();
+						module.toggleActive = GUITools.Toggle(module.toggleActive, module.Name);
 					}
 				}
 			}
@@ -624,17 +615,7 @@
 				GUILayout.Label("-- POWER LOST --", VOID_Styles.labelRed);
 			}
 
-			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
-
-			this.configWindowMinimized.value = !GUILayout.Toggle(
-				!this.configWindowMinimized,
-				GUIContent.none,
-				GUILayout.ExpandWidth(false)
-			);
-
-			GUILayout.Label("Configuration", GUILayout.ExpandWidth(true));
-
-			GUILayout.EndHorizontal();
+			this.configWindowMinimized.value = !GUITools.Toggle(!this.configWindowMinimized, "Configuration");
 
 			GUILayout.EndVertical();
 			GUI.DragWindow();
@@ -654,9 +635,9 @@
 		{
 			GUIContent _content;
 
-			this.UseToolbarManager = GUILayout.Toggle(this.UseToolbarManager, "Use Blizzy's Toolbar If Available");
-
-			this.vesselSimActive.value = GUILayout.Toggle(this.vesselSimActive.value,
+			this.UseToolbarManager = GUITools.Toggle(this.UseToolbarManager, "Use Blizzy's Toolbar If Available");
+
+			this.vesselSimActive.value = GUITools.Toggle(this.vesselSimActive.value,
 				"Enable Engineering Calculations");
 
 			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
@@ -730,7 +711,7 @@
 				mod.DrawConfigurables();
 			}
 
-			this.factoryReset = GUILayout.Toggle(this.factoryReset, "Factory Reset");
+			this.factoryReset = GUITools.Toggle(this.factoryReset, "Factory Reset");
 		}
 
 		protected void UpdateSimManager()

--- a/VOID_CareerStatus.cs
+++ b/VOID_CareerStatus.cs
@@ -48,11 +48,11 @@
 		{
 			if (delta > 0)
 			{
-				return string.Format("<color='lime'>{0}↑</color>", delta.ToString(numberFormat, Tools.mySIFormatter));
+				return string.Format("<color='lime'>{0}↑</color>", delta.ToString(numberFormat, Tools.SIFormatter));
 			}
 			else if (delta < 0)
 			{
-				return string.Format("<color='red'>{0}↓</color>", delta.ToString(numberFormat, Tools.mySIFormatter));
+				return string.Format("<color='red'>{0}↓</color>", delta.ToString(numberFormat, Tools.SIFormatter));
 			}
 			else
 			{

--- a/VOID_Data.cs
+++ b/VOID_Data.cs
@@ -283,7 +283,7 @@
 						return double.NaN;
 					}
 
-					return Core.LastStage.resourceMass;
+					return Core.LastStage.totalResourceMass;
 				},
 				"tons"
 			);

--- a/VOID_DataLogger.cs
+++ b/VOID_DataLogger.cs
@@ -45,6 +45,9 @@
 
 		protected bool _loggingActive;
 		protected bool firstWrite;
+
+		[AVOID_SaveValue("waitForLaunch")]
+		protected VOID_SaveValue<bool> waitForLaunch;
 
 		[AVOID_SaveValue("logInterval")]
 		protected VOID_SaveValue<float> logInterval;
@@ -194,7 +197,7 @@
 
 			// CSV Logging
 			// from ISA MapSat
-			if (loggingActive)
+			if (loggingActive && (!waitForLaunch || this.vessel.situation != Vessel.Situations.PRELAUNCH))
 			{
 				//data logging is on
 				//increment timers
@@ -255,12 +258,17 @@
 				activeLabelStyle = VOID_Styles.labelGreen;
 			}
 
-			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
-
-			this.loggingActive = GUILayout.Toggle(loggingActive, "Data logging: ", GUILayout.ExpandWidth(false));
-			GUILayout.Label(activeLabelText, activeLabelStyle, GUILayout.ExpandWidth(true));
-
-			GUILayout.EndHorizontal();
+			this.loggingActive = GUITools.Toggle(
+				loggingActive,
+				string.Format("Data logging: {0}", activeLabelText),
+				null,
+				activeLabelStyle
+			);
+
+			this.waitForLaunch.value = GUITools.Toggle(
+				this.waitForLaunch,
+				"Wait for launch"
+			);
 
 			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 
@@ -459,6 +467,8 @@
 			this.loggingActive = false;
 			this.firstWrite = true;
 
+			this.waitForLaunch = true;
+
 			this.logInterval = 0.5f;
 			this.csvCollectTimer = 0f;
 

--- a/VOID_HUDAdvanced.cs
+++ b/VOID_HUDAdvanced.cs
@@ -265,9 +265,7 @@
 				}
 			}
 
-			this.positionsLocked = GUILayout.Toggle(this.positionsLocked,
-				string.Intern("Lock Advanced HUD Positions"),
-				GUILayout.ExpandWidth(false));
+			this.positionsLocked = GUITools.Toggle(this.positionsLocked, string.Intern("Lock Advanced HUD Positions"));
 		}
 	}
 }

--- a/VOID_Orbital.cs
+++ b/VOID_Orbital.cs
@@ -79,7 +79,7 @@
 			this.precisionValues [idx]= (ushort)VOID_Data.gravityAccel.DoGUIHorizontal (this.precisionValues [idx]);
 			idx++;
 
-			this.toggleExtended.value = GUILayout.Toggle(this.toggleExtended, "Extended info");
+			this.toggleExtended.value = GUITools.Toggle(this.toggleExtended, "Extended info");
 
 			if (this.toggleExtended)
             {

--- a/VOID_Rendezvous.cs
+++ b/VOID_Rendezvous.cs
@@ -126,7 +126,7 @@
 				}
 			}
 
-			untoggleRegisterInfo.value = GUILayout.Toggle(untoggleRegisterInfo, "Hide Vessel Register Info");
+			untoggleRegisterInfo.value = GUITools.Toggle(untoggleRegisterInfo, "Hide Vessel Register Info");
 
 			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 			GUILayout.Label(" ", GUILayout.ExpandWidth(true));
@@ -199,7 +199,7 @@
 					GUILayout.Label(LSL.ToString("F3") + "°", VOID_Styles.labelRight);
 					GUILayout.EndHorizontal();
 
-					toggleExtendedOrbital.value = GUILayout.Toggle(toggleExtendedOrbital, "Extended info");
+					toggleExtendedOrbital.value = GUITools.Toggle(toggleExtendedOrbital, "Extended info");
 
 					if (toggleExtendedOrbital)
 					{