From c54d3ff3f903d0849c0b2459bdc821f6316bcd49 Mon Sep 17 00:00:00 2001 From: Allis Tauri Date: Thu, 9 Jul 2020 00:51:44 +0300 Subject: [PATCH 1/5] UIWindowBase now implements init_controller To allow control locking --- GUI/Elements/ControlPanel.cs | 1 + 1 file changed, 1 insertion(+) 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(); } From 00c78b7dd59606d378580114994a3797f914962d Mon Sep 17 00:00:00 2001 From: Allis Tauri Date: Mon, 20 Jul 2020 11:10:40 +0300 Subject: [PATCH 2/5] UIBundles are singletons and load synchronously on creation The assets from the bundles still load asynchronously, but preloading the bundle itself helps a lot with the initial lag. --- Globals.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 0a3484ec2b8c4a9da37753e8eae463012b0901e5 Mon Sep 17 00:00:00 2001 From: Allis Tauri Date: Mon, 20 Jul 2020 11:16:53 +0300 Subject: [PATCH 3/5] Replaced the old SimpleDialog with DialogFactory.Danger --- GUI/TCAGuiEditor.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/GUI/TCAGuiEditor.cs b/GUI/TCAGuiEditor.cs index 224c54ce..962f8e84 100644 --- a/GUI/TCAGuiEditor.cs +++ b/GUI/TCAGuiEditor.cs @@ -1,4 +1,4 @@ -// Author: +// Author: // Allis Tauri // // Copyright (c) 2015 Allis Tauri @@ -27,7 +27,6 @@ public class TCAGuiEditor : AddonWindowBase static Texture2D CoM_Icon; TCAPartsEditor PartsEditor; - SimpleWarning warning; ModuleTCA TCA; NamedConfig CFG; @@ -436,9 +435,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(); From 49137cb400c6cfd638c84dd60589af98ed9dbf5a Mon Sep 17 00:00:00 2001 From: Allis Tauri Date: Mon, 20 Jul 2020 11:33:58 +0300 Subject: [PATCH 4/5] RF+AF --- GUI/TCAGuiEditor.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GUI/TCAGuiEditor.cs b/GUI/TCAGuiEditor.cs index 962f8e84..24e52bd7 100644 --- a/GUI/TCAGuiEditor.cs +++ b/GUI/TCAGuiEditor.cs @@ -1,4 +1,4 @@ -// Author: +// Author: // Allis Tauri // // Copyright (c) 2015 Allis Tauri @@ -20,8 +20,6 @@ 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; From f7308596987ef5ac1fe6db0557fdb9e5cf883479 Mon Sep 17 00:00:00 2001 From: Allis Tauri Date: Wed, 22 Jul 2020 13:55:32 +0300 Subject: [PATCH 5/5] AssemblyVersion and ChangeLog --- AssemblyInfo.cs | 2 +- ChangeLog.md | 8 +++++++- .../ThrottleControlledAvionics.version | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) 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/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": {