Moved all configuration items to ARConfiguration, because that makes sense.
[AntennaRange.git] / ARConfiguration.cs
blob:a/ARConfiguration.cs -> blob:b/ARConfiguration.cs
--- a/ARConfiguration.cs
+++ b/ARConfiguration.cs
@@ -37,6 +37,12 @@
 			private set;
 		}
 
+		public static bool PrettyLines
+		{
+			get;
+			private set;
+		}
+
 		private bool showConfigWindow;
 		private Rect configWindowPos;
 
@@ -80,6 +86,8 @@
 				this.LoadConfigValue("requireConnectionForControl", false);
 
 			ARConfiguration.FixedPowerCost = this.LoadConfigValue("fixedPowerCost", false);
+
+			ARConfiguration.PrettyLines = this.LoadConfigValue("drawPrettyLines", true);
 
 			GameEvents.onGameSceneLoadRequested.Add(this.onSceneChangeRequested);
 
@@ -149,7 +157,7 @@
 
 			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 
-			bool requireLineOfSight = GUILayout.Toggle(ARConfiguration.RequireLineOfSight, "Require Line of Sight");
+			bool requireLineOfSight = GUITools.Toggle(ARConfiguration.RequireLineOfSight, "Require Line of Sight");
 			if (requireLineOfSight != ARConfiguration.RequireLineOfSight)
 			{
 				ARConfiguration.RequireLineOfSight = requireLineOfSight;
@@ -161,7 +169,7 @@
 			GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 
 			bool requireConnectionForControl =
-				GUILayout.Toggle(
+				GUITools.Toggle(
 					ARConfiguration.RequireConnectionForControl,
 					"Require Connection for Probe Control"
 				);
@@ -175,7 +183,7 @@
 
 			GUILayout.BeginHorizontal();
 
-			bool fixedPowerCost = GUILayout.Toggle(ARConfiguration.FixedPowerCost, "Use Fixed Power Cost");
+			bool fixedPowerCost = GUITools.Toggle(ARConfiguration.FixedPowerCost, "Use Fixed Power Cost");
 			if (fixedPowerCost != ARConfiguration.FixedPowerCost)
 			{
 				ARConfiguration.FixedPowerCost = fixedPowerCost;
@@ -184,6 +192,17 @@
 
 			GUILayout.EndHorizontal();
 
+			GUILayout.BeginHorizontal();
+
+			bool prettyLines = GUITools.Toggle(ARConfiguration.PrettyLines, "Draw Pretty Lines");
+			if (prettyLines != ARConfiguration.PrettyLines)
+			{
+				ARConfiguration.PrettyLines = prettyLines;
+				this.SaveConfigValue("drawPrettyLines", prettyLines);
+			}
+
+			GUILayout.EndHorizontal();
+
 			if (requireLineOfSight)
 			{
 				GUILayout.BeginHorizontal();