diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs index a7b59ec2..4460fee1 100644 --- a/AssemblyInfo.cs +++ b/AssemblyInfo.cs @@ -30,7 +30,7 @@ #if NIGHTBUILD [assembly: AssemblyVersion("3.7.*")] #else -[assembly: AssemblyVersion("3.7.0.1")] +[assembly: AssemblyVersion("3.7.1")] #endif [assembly: KSPAssembly("ThrottleControlledAvionics", 3, 7)] diff --git a/ChangeLog.md b/ChangeLog.md index d4b04182..e6fe0a2a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,8 +1,14 @@ +# Throttle Controlled Avionics ChangeLog + **DELETE the old version before installing a new one** _**BUT** do not delete the ThrottleControlledAvionics.user and config.xml files to preserve your settings_ -* **v3.7.0.1** +* **v3.7.1** + * Using new uGUI dialogs from AT_Utils + * Adapted to changes in AT_Utils + +* v3.7.0.1 * Compiled against KSP-1.10 * v3.7.0 - **Maneuver Engines Reloaded** diff --git a/GUI/Elements/ControlPanel.cs b/GUI/Elements/ControlPanel.cs index 8bf37e9f..fdcc64ea 100644 --- a/GUI/Elements/ControlPanel.cs +++ b/GUI/Elements/ControlPanel.cs @@ -36,6 +36,7 @@ public abstract class ControlPanel : UIWindowBase, IControlPanel where T : protected override void init_controller() { + base.init_controller(); if(Connected) OnLateUpdate(); } diff --git a/GUI/TCAGuiEditor.cs b/GUI/TCAGuiEditor.cs index 224c54ce..24e52bd7 100644 --- a/GUI/TCAGuiEditor.cs +++ b/GUI/TCAGuiEditor.cs @@ -20,14 +20,11 @@ namespace ThrottleControlledAvionics [KSPAddon(KSPAddon.Startup.EditorAny, false)] public class TCAGuiEditor : AddonWindowBase { - const string DefaultConstractName = "Untitled Space Craft"; - public static bool Available { get; private set; } Dictionary Modules = new Dictionary(); static Texture2D CoM_Icon; TCAPartsEditor PartsEditor; - SimpleWarning warning; ModuleTCA TCA; NamedConfig CFG; @@ -436,9 +433,11 @@ void DrawMainWindow(int windowID) Styles.active_button, GUILayout.ExpandWidth(true))) { var facility = EditorLogic.fetch.ship.shipFacility; - warning.Message = string.Format("Are you sure you want to save current ship configuration as default for {0}?", facility); - warning.yesCallback = () => TCAScenario.UpdateDefaultConfig(facility, CFG); - warning.Show(true); + DialogFactory.Danger( + $"Are you sure you want to save current ship configuration as default for {facility}?", + () => TCAScenario.UpdateDefaultConfig(facility, CFG), + context: this + ); } } GUILayout.EndHorizontal(); diff --git a/GameData/ThrottleControlledAvionics/ThrottleControlledAvionics.version b/GameData/ThrottleControlledAvionics/ThrottleControlledAvionics.version index 5f3fcb5e..efd39c1f 100644 --- a/GameData/ThrottleControlledAvionics/ThrottleControlledAvionics.version +++ b/GameData/ThrottleControlledAvionics/ThrottleControlledAvionics.version @@ -7,8 +7,8 @@ { "MAJOR":3, "MINOR":7, - "PATCH":0, - "BUILD":1 + "PATCH":1, + "BUILD":0 }, "KSP_VERSION_MIN": { diff --git a/Globals.cs b/Globals.cs index c9a6cbeb..a959e1ca 100644 --- a/Globals.cs +++ b/Globals.cs @@ -22,7 +22,7 @@ class Globals : PluginGlobals public const string RADIATION_ICON = "ThrottleControlledAvionics/Icons/waypoint"; public const string CIRCLE_ICON = "ThrottleControlledAvionics/Icons/path-node"; - public UIBundle AssetBundle = new UIBundle("ThrottleControlledAvionics/tca_ui.ksp"); + public UIBundle AssetBundle = UIBundle.Create("ThrottleControlledAvionics/tca_ui.ksp"); [Persistent] public bool IntegrateIntoCareer = true; [Persistent] public bool RoleSymmetryInFlight = true;