From a12b11a339d5949c5db3d85dc75d1ae13659ee23 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Sun, 31 May 2020 18:26:27 -0700 Subject: [PATCH] Add localization --- .../ConformalDecals/Localization/en-us.cfg | 11 +++++++++++ Source/ConformalDecals/ModuleConformalDecal.cs | 14 +++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 Distribution/GameData/ConformalDecals/Localization/en-us.cfg diff --git a/Distribution/GameData/ConformalDecals/Localization/en-us.cfg b/Distribution/GameData/ConformalDecals/Localization/en-us.cfg new file mode 100644 index 0000000..37f4af2 --- /dev/null +++ b/Distribution/GameData/ConformalDecals/Localization/en-us.cfg @@ -0,0 +1,11 @@ +Localization +{ + en-us + { + #LOC_ConformalDecals_gui_scale = Scale + #LOC_ConformalDecals_gui_depth = Depth + #LOC_ConformalDecals_gui_opacity = Opacity + #LOC_ConformalDecals_gui_cutoff = Cutoff + #LOC_ConformalDecals_gui_aspect-ratio = Aspect Ratio + } +} \ No newline at end of file diff --git a/Source/ConformalDecals/ModuleConformalDecal.cs b/Source/ConformalDecals/ModuleConformalDecal.cs index 22865c0..02c4442 100644 --- a/Source/ConformalDecals/ModuleConformalDecal.cs +++ b/Source/ConformalDecals/ModuleConformalDecal.cs @@ -10,15 +10,23 @@ namespace ConformalDecals { [KSPField] public string decalModelTransform = ""; [KSPField] public string decalProjectorTransform = ""; - [KSPField(guiName = "Scale", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), + [KSPField(guiName = "#LOC_ConformalDecals_gui-scale", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)] public float scale = 1.0f; - [KSPField(guiName = "Depth", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), + [KSPField(guiName = "#LOC_ConformalDecals_gui-depth", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)] public float depth = 1.0f; + + [KSPField(guiName = "#LOC_ConformalDecals_gui-opacity", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), + UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)] + public float opacity= 1.0f; + + [KSPField(guiName = "#LOC_ConformalDecals_gui-cutoff", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), + UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)] + public float cutoff = 0.5f; - [KSPField(guiActive = true, guiFormat = "F2", guiName = "Aspect Ratio")] + [KSPField(guiName = "#LOC_ConformalDecals_gui-aspectratio", guiActive = true, guiFormat = "F2")] public float aspectRatio = 1.0f; [KSPField] public MaterialPropertyCollection materialProperties;