Added presets to the Flight Engineer.
Added presets to the Flight Engineer.

--- /dev/null
+++ b/KerbalEngineer/Flight/Presets/Preset.cs
@@ -1,1 +1,49 @@
+// 
+//     Kerbal Engineer Redux
+// 
+//     Copyright (C) 2014 CYBUTEK
+// 
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU General Public License as published by
+//     the Free Software Foundation, either version 3 of the License, or
+//     (at your option) any later version.
+// 
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU General Public License for more details.
+// 
+//     You should have received a copy of the GNU General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+// 
 
+#region Using Directives
+
+using System.Linq;
+
+#endregion
+
+namespace KerbalEngineer.Flight.Presets
+{
+    public class Preset
+    {
+        #region Properties
+
+        public string Name { get; set; }
+
+        public string Abbreviation { get; set; }
+
+        public string[] ReadoutNames { get; set; }
+
+        #endregion
+
+        #region Debugging
+
+        public override string ToString()
+        {
+            return this.Name + this.ReadoutNames.Select(r => "\n\t" + r);
+        }
+
+        #endregion
+    }
+}

--- /dev/null
+++ b/KerbalEngineer/Flight/Presets/PresetLibrary.cs
@@ -1,1 +1,89 @@
+// 
+//     Kerbal Engineer Redux
+// 
+//     Copyright (C) 2014 CYBUTEK
+// 
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU General Public License as published by
+//     the Free Software Foundation, either version 3 of the License, or
+//     (at your option) any later version.
+// 
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU General Public License for more details.
+// 
+//     You should have received a copy of the GNU General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+// 
 
+#region Using Directives
+
+using System.Collections.Generic;
+using System.IO;
+using System.Text.RegularExpressions;
+
+using KerbalEngineer.Settings;
+
+#endregion
+
+namespace KerbalEngineer.Flight.Presets
+{
+    public class PresetLibrary
+    {
+        #region Fields
+
+        private static readonly List<Preset> presets = new List<Preset>();
+
+        #endregion
+
+        #region Constructors
+
+        static PresetLibrary()
+        {
+            Load();
+        }
+
+        #endregion
+
+        #region Properties
+
+        public static List<Preset> Presets
+        {
+            get { return presets; }
+        }
+
+        #endregion
+
+        #region Public Methods
+
+        public static void Save()
+        {
+            if (!Directory.Exists(Path.Combine(SettingHandler.SettingsDirectory, "../Presets")))
+            {
+                Directory.CreateDirectory(Path.Combine(SettingHandler.SettingsDirectory, "../Presets"));
+            }
+            foreach (var preset in presets)
+            {
+                var handler = new SettingHandler();
+                handler.Set("preset", preset);
+                handler.Save(Path.Combine("../Presets", Regex.Replace(preset.Name, @"[^\d\w]", string.Empty) + ".xml"));
+            }
+        }
+
+        public static void Load()
+        {
+            if (!Directory.Exists(Path.Combine(SettingHandler.SettingsDirectory, "../Presets")))
+            {
+                Directory.CreateDirectory(Path.Combine(SettingHandler.SettingsDirectory, "../Presets"));
+            }
+            foreach (var file in Directory.GetFiles(Path.Combine(SettingHandler.SettingsDirectory, "../Presets")))
+            {
+                var handler = SettingHandler.Load(file, new[] {typeof(Preset)});
+                presets.Add(handler.Get<Preset>("preset", null));
+            }
+        }
+
+        #endregion
+    }
+}

--- a/KerbalEngineer/Flight/Readouts/ReadoutLibrary.cs
+++ b/KerbalEngineer/Flight/Readouts/ReadoutLibrary.cs
@@ -62,11 +62,11 @@
         {
             try
             {
-                ReadoutCategory.SetCategory("Orbital", "Readouts for orbital manovoeures.");
-                ReadoutCategory.SetCategory("Surface", "Readouts showing surface and atmospheric information.");
-                ReadoutCategory.SetCategory("Vessel", "Readouts showing vessel performance statistics.");
+                ReadoutCategory.SetCategory("Orbital", "Readout for orbital manovoeures.");
+                ReadoutCategory.SetCategory("Surface", "Surface and atmospheric readouts.");
+                ReadoutCategory.SetCategory("Vessel", "Vessel performance statistics.");
                 ReadoutCategory.SetCategory("Rendezvous", "Readouts for rendezvous manovoeures.");
-                ReadoutCategory.SetCategory("Miscellaneous", "Readouts that do not fit into other categories.");
+                ReadoutCategory.SetCategory("Miscellaneous", "Miscellaneous readouts.");
 
                 // Orbital
                 readouts.Add(new ApoapsisHeight());

--- a/KerbalEngineer/Flight/Sections/SectionEditor.cs
+++ b/KerbalEngineer/Flight/Sections/SectionEditor.cs
@@ -20,8 +20,10 @@
 #region Using Directives
 
 using System;
+using System.Linq;
 
 using KerbalEngineer.Extensions;
+using KerbalEngineer.Flight.Presets;
 using KerbalEngineer.Flight.Readouts;
 using KerbalEngineer.UIControls;
 
@@ -42,10 +44,11 @@
 
         #region Fields
 
+        private DropDown categoryList;
+        private Rect position;
+        private DropDown presetList;
         private Vector2 scrollPositionAvailable;
         private Vector2 scrollPositionInstalled;
-        private Rect position;
-        private DropDown categoryList;
 
         #endregion
 
@@ -57,6 +60,9 @@
             {
                 this.categoryList = this.gameObject.AddComponent<DropDown>();
                 this.categoryList.DrawCallback = this.DrawCategories;
+
+                this.presetList = this.gameObject.AddComponent<DropDown>();
+                this.presetList.DrawCallback = this.DrawPresets;
             }
             catch (Exception ex)
             {
@@ -96,9 +102,9 @@
 
         #region GUIStyles
 
+        private GUIStyle categoryButtonActiveStyle;
+        private GUIStyle categoryButtonStyle;
         private GUIStyle categoryTitleButtonStyle;
-        private GUIStyle categoryButtonStyle;
-        private GUIStyle categoryButtonActiveStyle;
         private GUIStyle helpBoxStyle;
         private GUIStyle helpTextStyle;
         private GUIStyle panelTitleStyle;
@@ -120,8 +126,8 @@
                 {
                     textColor = Color.white
                 },
-                margin = new RectOffset(0,0,2,0),
-                padding = new RectOffset(5,5,5,5),
+                margin = new RectOffset(0, 0, 2, 0),
+                padding = new RectOffset(5, 5, 5, 5),
                 alignment = TextAnchor.MiddleCenter,
                 fontSize = 12,
                 fontStyle = FontStyle.Normal,
@@ -234,7 +240,10 @@
         private void Window(int windowId)
         {
             this.DrawCustomOptions();
+            GUILayout.BeginHorizontal();
             this.DrawCategorySelector();
+            this.DrawPresetSelector();
+            GUILayout.EndHorizontal();
             this.DrawAvailableReadouts();
             GUILayout.Space(5.0f);
             this.DrawInstalledReadouts();
@@ -262,9 +271,8 @@
                 {
                     DisplayStack.Instance.RequestResize();
                 }
-                if (GUILayout.Button("DELETE SECTION", this.readoutButtonStyle, GUILayout.Width(125.0f)))
-                {
-
+                if (GUILayout.Button("DELETE SECTION", this.readoutButtonStyle, GUILayout.Width(150.0f)))
+                {
                     this.ParentSection.IsFloating = false;
                     this.ParentSection.IsEditorVisible = false;
                     SectionLibrary.CustomSections.Remove(this.ParentSection);
@@ -286,15 +294,87 @@
             }
         }
 
+        /// <summary>
+        ///     Draws the categories list drop down UI.
+        /// </summary>
         private void DrawCategories()
         {
             foreach (var category in ReadoutCategory.Categories)
             {
-                if (GUILayout.Button("<b>" + category.Name.ToUpper() + "</b>" + (string.IsNullOrEmpty(category.Description) ? string.Empty : "\n<i>" + category.Description + "</i>"), category == ReadoutCategory.Selected ? this.categoryButtonActiveStyle : this.categoryButtonStyle))
+                var description = category.Description;
+                if (description.Length > 50)
+                {
+                    description = description.Substring(0, 50 - 1) + "...";
+                }
+
+                if (GUILayout.Button("<b>" + category.Name.ToUpper() + "</b>" + (string.IsNullOrEmpty(category.Description) ? string.Empty : "\n<i>" + description + "</i>"), category == ReadoutCategory.Selected ? this.categoryButtonActiveStyle : this.categoryButtonStyle))
                 {
                     ReadoutCategory.Selected = category;
                     this.categoryList.enabled = false;
                 }
+            }
+        }
+
+        /// <summary>
+        ///     Draws the presetsList selection list.
+        /// </summary>
+        private void DrawPresetSelector()
+        {
+            this.presetList.enabled = GUILayout.Toggle(this.presetList.enabled, "▼ PRESETS ▼", this.categoryTitleButtonStyle, GUILayout.Width(150.0f));
+            if (Event.current.type == EventType.repaint)
+            {
+                this.presetList.SetPosition(GUILayoutUtility.GetLastRect().Translate(this.position));
+            }
+        }
+
+        /// <summary>
+        ///     Draws the preset list drop down UI.
+        /// </summary>
+        private void DrawPresets()
+        {
+            Preset removePreset = null;
+            foreach (var preset in PresetLibrary.Presets)
+            {
+                GUILayout.BeginHorizontal();
+                if (GUILayout.Button("<b>" + preset.Name.ToUpper() + "</b>", this.categoryButtonStyle))
+                {
+                    this.ParentSection.Name = preset.Name;
+                    this.ParentSection.Abbreviation = preset.Abbreviation;
+                    this.ParentSection.ReadoutModuleNames = preset.ReadoutNames;
+                    this.presetList.enabled = false;
+                }
+                if (GUILayout.Button("<b>X</b>", this.categoryButtonStyle, GUILayout.Width(30.0f)))
+                {
+                    removePreset = preset;
+                }
+                GUILayout.EndHorizontal();
+            }
+            if (removePreset != null)
+            {
+                PresetLibrary.Presets.Remove(removePreset);
+                this.presetList.Resize = true;
+            }
+
+            if (GUILayout.Button("<b>NEW PRESET</b>", this.categoryButtonStyle))
+            {
+                var preset = PresetLibrary.Presets.Find(p => String.Equals(p.Name, this.ParentSection.Name, StringComparison.CurrentCultureIgnoreCase));
+                if (preset != null)
+                {
+                    preset.Name = this.ParentSection.Name;
+                    preset.Abbreviation = this.ParentSection.Abbreviation;
+                    preset.ReadoutNames = this.ParentSection.ReadoutModuleNames;
+                }
+                else
+                {
+                    preset = new Preset()
+                    {
+                        Name = this.ParentSection.Name,
+                        Abbreviation = this.ParentSection.Abbreviation,
+                        ReadoutNames = this.ParentSection.ReadoutModuleNames
+                    };
+                    PresetLibrary.Presets.Add(preset);
+                }
+                PresetLibrary.Save();
             }
         }
 

--- a/KerbalEngineer/Flight/Sections/SectionEditorCategoryList.cs
+++ /dev/null
@@ -1,205 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2014 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-#region Using Directives
-
-using System;
-
-using KerbalEngineer.Extensions;
-using KerbalEngineer.Flight.Readouts;
-
-using UnityEngine;
-
-#endregion
-
-namespace KerbalEngineer.Flight.Sections
-{
-    public class SectionEditorCategoryList : MonoBehaviour
-    {
-        #region Fields
-
-        private Rect position;
-        private bool resize;
-
-        #endregion
-
-        #region properties
-
-        public Rect Position
-        {
-            get { return this.position; }
-        }
-
-        #endregion
-
-        #region Initialisation
-
-        private void Awake()
-        {
-            try
-            {
-                this.enabled = false;
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        private void Start()
-        {
-            try
-            {
-                this.InitialiseStyles();
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        #endregion
-
-        #region Styles
-
-        private GUIStyle buttonActiveStyle;
-        private GUIStyle buttonStyle;
-        private GUIStyle windowStyle;
-
-        private void InitialiseStyles()
-        {
-            try
-            {
-                this.windowStyle = new GUIStyle
-                {
-                    normal =
-                    {
-                        background = GameDatabase.Instance.GetTexture("KerbalEngineer/Textures/BodyListBackground", false)
-                    },
-                    border = new RectOffset(8, 8, 1, 8),
-                    margin = new RectOffset(),
-                    padding = new RectOffset(5, 5, 5, 5)
-                };
-
-                this.buttonStyle = new GUIStyle(HighLogic.Skin.button)
-                {
-                    normal =
-                    {
-                        textColor = Color.white
-                    },
-                    alignment = TextAnchor.MiddleCenter,
-                    fontSize = 12,
-                    fontStyle = FontStyle.Bold,
-                    fixedHeight = 30.0f,
-                };
-
-                this.buttonActiveStyle = new GUIStyle(this.buttonStyle)
-                {
-                    normal = this.buttonStyle.active
-                };
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        #endregion
-
-        #region Updating
-
-        private void Update()
-        {
-            try
-            {
-                if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2)) && !this.position.MouseIsOver())
-                {
-                    this.enabled = false;
-                }
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        #endregion
-
-        #region Drawing
-
-        private void OnGUI()
-        {
-            try
-            {
-                if (this.resize)
-                {
-                    this.position.height = 0;
-                    this.resize = false;
-                }
-
-                GUI.skin = null;
-                this.position = GUILayout.Window(this.GetInstanceID(), this.position, this.Window, string.Empty, this.windowStyle);
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        private void Window(int windowId)
-        {
-            try
-            {
-                GUI.BringWindowToFront(windowId);
-                foreach (var category in ReadoutCategory.Categories)
-                {
-                    if (GUILayout.Button(category.Name, category == ReadoutCategory.Selected ? this.buttonActiveStyle : this.buttonStyle))
-                    {
-                        ReadoutCategory.Selected = category;
-                        this.enabled = false;
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        #endregion
-
-        #region Public Methods
-
-        public void SetPosition(Rect position)
-        {
-            try
-            {
-                this.position.x = position.x;
-                this.position.y = position.y + position.height;
-                this.position.width = position.width;
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex);
-            }
-        }
-
-        #endregion
-    }
-}

--- a/KerbalEngineer/KerbalEngineer.csproj
+++ b/KerbalEngineer/KerbalEngineer.csproj
@@ -63,6 +63,7 @@
     <Compile Include="Extensions\OrbitExtensions.cs" />
     <Compile Include="Flight\ActionMenuGui.cs" />
     <Compile Include="Flight\FlightEngineerPartless.cs" />
+    <Compile Include="Flight\Presets\Preset.cs" />
     <Compile Include="Flight\Readouts\Miscellaneous\Separator.cs" />
     <Compile Include="Flight\Readouts\Miscellaneous\GuiSizeAdjustor.cs" />
     <Compile Include="Flight\Readouts\Orbital\AngleToDescendingNode.cs" />
@@ -81,7 +82,7 @@
     <Compile Include="Flight\Readouts\Vessel\SimulationDelay.cs" />
     <Compile Include="Flight\Readouts\Vessel\SimulationProcessor.cs" />
     <Compile Include="Flight\Readouts\Vessel\Acceleration.cs" />
-    <Compile Include="Flight\Sections\SectionEditorCategoryList.cs" />
+    <Compile Include="Flight\Presets\PresetLibrary.cs" />
     <Compile Include="GuiDisplaySize.cs" />
     <Compile Include="UIControls\DropDown.cs" />
     <Compile Include="Logger.cs" />

--- a/KerbalEngineer/Settings/SettingHandler.cs
+++ b/KerbalEngineer/Settings/SettingHandler.cs
@@ -74,6 +74,11 @@
         #region Properties
 
         /// <summary>
+        ///     Gets the directory where settings files are saved/loaded.
+        /// </summary>
+        public static string SettingsDirectory { get { return settingsDirectory; } }
+
+        /// <summary>
         ///     Gets and sets the list of items.
         /// </summary>
         public List<SettingItem> Items { get; set; }

--- a/Output/CHANGES.txt
+++ b/Output/CHANGES.txt
@@ -1,6 +1,7 @@
 1.0.7.0
     Added: Part count information to the Build Engineer.
     Added: IntakeAir Supply & Demand readouts to the vessel category.
+    Changed: Updated MiniAVC to v1.0.2.3.
 	Fixed: Issues with large value wrap around in the Flight Engineer.
 
 1.0.6.0

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ
 Binary files a/Output/KerbalEngineer/MiniAVC.dll and b/Output/KerbalEngineer/MiniAVC.dll differ
--- /dev/null
+++ b/Output/KerbalEngineer/Presets/ORBITAL.xml
@@ -1,1 +1,21 @@
-
+<?xml version="1.0" encoding="utf-8"?>
+<ArrayOfSettingItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <SettingItem>
+    <Name>preset</Name>
+    <Value xsi:type="Preset">
+      <Name>ORBITAL</Name>
+      <Abbreviation>ORBT</Abbreviation>
+      <ReadoutNames>
+        <string>Orbital.ApoapsisHeight</string>
+        <string>Orbital.TimeToApoapsis</string>
+        <string>Miscellaneous.Separator</string>
+        <string>Orbital.PeriapsisHeight</string>
+        <string>Orbital.TimeToPeriapsis</string>
+        <string>Miscellaneous.Separator</string>
+        <string>Surface.VerticalSpeed</string>
+        <string>Orbital.Inclination</string>
+        <string>Orbital.SemiMajorAxis</string>
+      </ReadoutNames>
+    </Value>
+  </SettingItem>
+</ArrayOfSettingItem>

--- /dev/null
+++ b/Output/KerbalEngineer/Presets/SURFACE.xml
@@ -1,1 +1,22 @@
-
+<?xml version="1.0" encoding="utf-8"?>
+<ArrayOfSettingItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <SettingItem>
+    <Name>preset</Name>
+    <Value xsi:type="Preset">
+      <Name>SURFACE</Name>
+      <Abbreviation>SURF</Abbreviation>
+      <ReadoutNames>
+        <string>Surface.AltitudeSeaLevel</string>
+        <string>Surface.AltitudeTerrain</string>
+        <string>Surface.Biome</string>
+        <string>Miscellaneous.Separator</string>
+        <string>Surface.VerticalSpeed</string>
+        <string>Surface.HorizontalSpeed</string>
+        <string>Miscellaneous.Separator</string>
+        <string>Surface.Slope</string>
+        <string>Surface.ImpactTime</string>
+        <string>Surface.ImpactBiome</string>
+      </ReadoutNames>
+    </Value>
+  </SettingItem>
+</ArrayOfSettingItem>

--- /dev/null
+++ b/Output/KerbalEngineer/Presets/VESSEL.xml
@@ -1,1 +1,18 @@
-
+<?xml version="1.0" encoding="utf-8"?>
+<ArrayOfSettingItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <SettingItem>
+    <Name>preset</Name>
+    <Value xsi:type="Preset">
+      <Name>VESSEL</Name>
+      <Abbreviation>VESL</Abbreviation>
+      <ReadoutNames>
+        <string>Vessel.DeltaVStaged</string>
+        <string>Miscellaneous.Separator</string>
+        <string>Vessel.DeltaVTotal</string>
+        <string>Miscellaneous.Separator</string>
+        <string>Vessel.ThrustToWeight</string>
+        <string>Vessel.Acceleration</string>
+      </ReadoutNames>
+    </Value>
+  </SettingItem>
+</ArrayOfSettingItem>