From e4adf28c4f4f1b61c09383119c17cd54a18a2355 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Sat, 26 Sep 2020 00:02:34 -0700 Subject: [PATCH] Fix localization and material updates --- GameData/ConformalDecals/Plugins/ConformalDecals.dll | 2 +- Source/ConformalDecals/ModuleConformalText.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/GameData/ConformalDecals/Plugins/ConformalDecals.dll index 20c7bed..1e9f233 100644 --- a/GameData/ConformalDecals/Plugins/ConformalDecals.dll +++ b/GameData/ConformalDecals/Plugins/ConformalDecals.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cedff4e96de1dfcaee14eb43cc6a258bf17be3c6fcec42f6e48249668d8aefa9 +oid sha256:24dc0d4b3ee3e591a1fc612f1b8e4bdf7978ed3d4baa4d1c3f9d15452d9e353a size 87040 diff --git a/Source/ConformalDecals/ModuleConformalText.cs b/Source/ConformalDecals/ModuleConformalText.cs index 07de33f..5e7221e 100644 --- a/Source/ConformalDecals/ModuleConformalText.cs +++ b/Source/ConformalDecals/ModuleConformalText.cs @@ -39,7 +39,7 @@ namespace ConformalDecals { UI_Toggle()] public bool fillEnabled = true; - [KSPEvent(guiName = "#LOC_ConformalDecals_gui-fill-color", groupName = "decal-fill", groupDisplayName = "#LOC_ConformalDecals_gui-group-fill", + [KSPEvent(guiName = "#LOC_ConformalDecals_gui-set-fill-color", groupName = "decal-fill", groupDisplayName = "#LOC_ConformalDecals_gui-group-fill", guiActive = false, guiActiveEditor = true)] public void SetFillColor() { if (_fillColorPickerController == null) { @@ -157,12 +157,14 @@ namespace ConformalDecals { outlineEnabled = outlineEnabled || (!outlineEnabled && !fillEnabled); UpdateTweakables(); + UpdateMaterials(); foreach (var counterpart in part.symmetryCounterparts) { var decal = counterpart.GetComponent(); decal.fillEnabled = fillEnabled; decal.outlineEnabled = outlineEnabled; decal.UpdateTweakables(); + decal.UpdateMaterials(); } } @@ -171,12 +173,14 @@ namespace ConformalDecals { fillEnabled = fillEnabled || (!fillEnabled && !outlineEnabled); UpdateTweakables(); + UpdateMaterials(); foreach (var counterpart in part.symmetryCounterparts) { var decal = counterpart.GetComponent(); decal.fillEnabled = fillEnabled; decal.outlineEnabled = outlineEnabled; decal.UpdateTweakables(); + decal.UpdateMaterials(); } } @@ -204,7 +208,7 @@ namespace ConformalDecals { } public override void OnDestroy() { - if (_currentText != null) TextRenderer.UnregisterText(_currentText); + if (HighLogic.LoadedSceneIsGame && _currentText != null) TextRenderer.UnregisterText(_currentText); base.OnDestroy(); }