Skip to content

Commit

Permalink
Restore Defaults Fix
Browse files Browse the repository at this point in the history
Should restore all camera values to default now.
Also, the booleans should be saved properly now.
Offset sliders set to -10,10
  • Loading branch information
Tribow committed Jul 16, 2022
1 parent 4660d93 commit 301c5e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Distance.CameraAdditions/ConfigLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ public void Awake()
Set("XOffset", 0f); //XOffset will not remember previous settings
Get("YOffset", 0f);
Set("YOffset", 0f); //YOffset will not remember previous settings
Get("LockFOV", false);
Get("LockCameraPosition", false);
Get("EnableFreeCam", false);
Get("IncreaseFOVHotkey", "LeftControl+P");
Get("DecreaseFOVHotkey", "LeftControl+O");
Get("ZoomOutHotkey", "LeftControl+N");
Expand Down
11 changes: 7 additions & 4 deletions Distance.CameraAdditions/Entry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ private void CreateSettingsMenu()
.WithDescription("Lock the FOV of Chase Cam mode"),

new FloatSlider(MenuDisplayMode.Both, "setting:zoom_offset", "ZOOM OFFSET")
.LimitedByRange(-3f, 20f)
.LimitedByRange(-10f, 10f)
.WithDefaultValue(0f)
.WithGetter(() => Config.ZoomOffset)
.WithSetter((x) => Config.ZoomOffset = x)
.WithDescription("Adjust zoom offset of the Chase Cam mode (Acts as the Z offset for Cockpit and Mounted Camera)"),

new FloatSlider(MenuDisplayMode.Both, "setting:x_offset", "X OFFSET")
.LimitedByRange(-20f, 20f)
.LimitedByRange(-10f, 10f)
.WithDefaultValue(0f)
.WithGetter(() => Config.XOffset)
.WithSetter((x) => Config.XOffset = x)
.WithDescription("Adjust the X axis offset of all Car Camera Modes"),

new FloatSlider(MenuDisplayMode.Both, "setting:y_offset", "Y OFFSET")
.LimitedByRange(-20f, 20f)
.LimitedByRange(-10f, 10f)
.WithDefaultValue(0f)
.WithGetter(() => Config.YOffset)
.WithSetter((x) => Config.YOffset = x)
Expand Down Expand Up @@ -176,7 +176,7 @@ private void CreateSettingsMenu()
.WithTitle("DECREASE Y OFFSET HOTKEY")
.WithDescription("Set the hotkey for decreasing the Y offset"),
};

Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "CAMERA ADDITIONS", "Settings for the camera additions mod.");
}

Expand Down Expand Up @@ -251,6 +251,9 @@ private void SetDefaults()
Config.ZoomOffset = 0f;
Config.XOffset = 0f;
Config.YOffset = 0f;
Config.LockCameraPosition = false;
Config.LockFOV = false;
Config.FOV = 125;
}
}
}

0 comments on commit 301c5e6

Please sign in to comment.