mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Fix localization and material updates
This commit is contained in:
parent
54cd5dce20
commit
8b05dc57e8
Binary file not shown.
@ -39,7 +39,7 @@ namespace ConformalDecals {
|
|||||||
UI_Toggle()]
|
UI_Toggle()]
|
||||||
public bool fillEnabled = true;
|
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)]
|
guiActive = false, guiActiveEditor = true)]
|
||||||
public void SetFillColor() {
|
public void SetFillColor() {
|
||||||
if (_fillColorPickerController == null) {
|
if (_fillColorPickerController == null) {
|
||||||
@ -157,12 +157,14 @@ namespace ConformalDecals {
|
|||||||
outlineEnabled = outlineEnabled || (!outlineEnabled && !fillEnabled);
|
outlineEnabled = outlineEnabled || (!outlineEnabled && !fillEnabled);
|
||||||
|
|
||||||
UpdateTweakables();
|
UpdateTweakables();
|
||||||
|
UpdateMaterials();
|
||||||
|
|
||||||
foreach (var counterpart in part.symmetryCounterparts) {
|
foreach (var counterpart in part.symmetryCounterparts) {
|
||||||
var decal = counterpart.GetComponent<ModuleConformalText>();
|
var decal = counterpart.GetComponent<ModuleConformalText>();
|
||||||
decal.fillEnabled = fillEnabled;
|
decal.fillEnabled = fillEnabled;
|
||||||
decal.outlineEnabled = outlineEnabled;
|
decal.outlineEnabled = outlineEnabled;
|
||||||
decal.UpdateTweakables();
|
decal.UpdateTweakables();
|
||||||
|
decal.UpdateMaterials();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,12 +173,14 @@ namespace ConformalDecals {
|
|||||||
fillEnabled = fillEnabled || (!fillEnabled && !outlineEnabled);
|
fillEnabled = fillEnabled || (!fillEnabled && !outlineEnabled);
|
||||||
|
|
||||||
UpdateTweakables();
|
UpdateTweakables();
|
||||||
|
UpdateMaterials();
|
||||||
|
|
||||||
foreach (var counterpart in part.symmetryCounterparts) {
|
foreach (var counterpart in part.symmetryCounterparts) {
|
||||||
var decal = counterpart.GetComponent<ModuleConformalText>();
|
var decal = counterpart.GetComponent<ModuleConformalText>();
|
||||||
decal.fillEnabled = fillEnabled;
|
decal.fillEnabled = fillEnabled;
|
||||||
decal.outlineEnabled = outlineEnabled;
|
decal.outlineEnabled = outlineEnabled;
|
||||||
decal.UpdateTweakables();
|
decal.UpdateTweakables();
|
||||||
|
decal.UpdateMaterials();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +208,7 @@ namespace ConformalDecals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void OnDestroy() {
|
public override void OnDestroy() {
|
||||||
if (_currentText != null) TextRenderer.UnregisterText(_currentText);
|
if (HighLogic.LoadedSceneIsGame && _currentText != null) TextRenderer.UnregisterText(_currentText);
|
||||||
|
|
||||||
base.OnDestroy();
|
base.OnDestroy();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user