Got configurables done through DrawConfigurables. This might be hackish?
[VOID.git] / VOID_HUD.cs
blob:a/VOID_HUD.cs -> blob:b/VOID_HUD.cs
--- a/VOID_HUD.cs
+++ b/VOID_HUD.cs
@@ -32,12 +32,14 @@
 		/*
 		 * Fields
 		 * */
+		protected bool _hasConfigurables = true;
+
+		[AVOID_ConfigValue("colorIndex")]
+		protected VOID_ConfigValue<int> _colorIndex = 0;
+
 		protected List<Color> textColors = new List<Color>();
 
 		protected GUIStyle labelStyle;
-
-		[AVOID_ConfigValue("colorIndex")]
-		protected VOID_ConfigValue<int> _colorIndex = 0;
 
 		protected Vessel vessel = null;
 
@@ -135,6 +137,14 @@
 				GUI.Label (new Rect ((Screen.width * .625f), 0, 300f, 70f), "-- POWER LOST --", labelStyle);
 			}
 		}
+
+		public override void DrawConfigurables()
+		{
+			if (GUILayout.Button ("Change HUD color", GUILayout.ExpandWidth (false)))
+			{
+				++this.ColorIndex;
+			}
+		}
 	}
 }