diff --git a/1.5/Assemblies/CameraPlus.dll b/1.5/Assemblies/CameraPlus.dll index 4e2c131..cfc5a3a 100644 Binary files a/1.5/Assemblies/CameraPlus.dll and b/1.5/Assemblies/CameraPlus.dll differ diff --git a/Source/Settings.cs b/Source/Settings.cs index 8f63f78..1ed3669 100644 --- a/Source/Settings.cs +++ b/Source/Settings.cs @@ -112,6 +112,14 @@ public override void ExposeData() Tools.ScribeArrays(ref defaultInnerColors, "defaultInnerColors", defaults.defaultInnerColors); Tools.ScribeArrays(ref customOuterColors, "customOuterColors", defaults.customOuterColors); Tools.ScribeArrays(ref customInnerColors, "customInnerColors", defaults.customInnerColors); + + ApplyCalculatedValues(); + } + + void ApplyCalculatedValues() + { + minRootResult = zoomedInPercent * 2; + maxRootResult = zoomedOutPercent * 2; } public void DoWindowContents(Rect inRect) @@ -123,7 +131,10 @@ public void DoWindowContents(Rect inRect) var restoreLen = restoreText.GetWidthCached() + 12f; var rect = new Rect(inRect.width - restoreLen, inRect.yMin - 30f, restoreLen, 30f); if (Widgets.ButtonText(rect, restoreText)) + { Traverse.IterateFields(new CameraPlusSettings(), Settings, (t1, t2) => t2.SetValue(t1.GetValue())); + ApplyCalculatedValues(); + } float previous; var map = Current.Game?.CurrentMap;