diff --git a/CHANGELOG.md b/CHANGELOG.md index 5635e04..d88235e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Full Changelog +## [Unreleased] - ????-??-?? + +## [2.0.1] - 2023-02-02 + +### Changed + +- Minimum SMAPI version to 3.18.2 + +### Fixed + +- Camera movement issues with some mods + + ## [2.0.0] - 2023-02-01 ### Added @@ -24,7 +37,7 @@ ### Changed -- Minimum API version to 3.18.1 +- Minimum SMAPI version to 3.18.1 ## [1.13.0] - 2022-07-24 @@ -178,7 +191,8 @@ - Initial release -[Unreleased]: https://github.com/thespbgamer/ZoomLevel/compare/2.0.0...HEAD +[Unreleased]: https://github.com/thespbgamer/ZoomLevel/compare/2.0.1...HEAD +[2.0.1]: https://github.com/thespbgamer/ZoomLevel/releases/tag/2.0.1 [2.0.0]: https://github.com/thespbgamer/ZoomLevel/releases/tag/2.0.0 [1.15.0]: https://github.com/thespbgamer/ZoomLevel/releases/tag/1.15.0 [1.14.0]: https://github.com/thespbgamer/ZoomLevel/releases/tag/1.14.0 diff --git a/ZoomLevel/ModEntry.cs b/ZoomLevel/ModEntry.cs index 11ccd9f..1921dbd 100644 --- a/ZoomLevel/ModEntry.cs +++ b/ZoomLevel/ModEntry.cs @@ -16,6 +16,7 @@ public class ModEntry : Mod private bool wasThePreviousButtonPressSucessfull; private bool wasToggleUIScaleClicked; private bool wasZoomLevelChanged; + private bool wasCameraFrozen; private float uiScaleBeforeTheHidding; private float currentUIScale; @@ -82,6 +83,7 @@ private void GameLoop_SaveLoaded(object sender, SaveLoadedEventArgs e) wasThePreviousButtonPressSucessfull = false; wasToggleUIScaleClicked = false; wasZoomLevelChanged = false; + wasCameraFrozen = false; if (configsForTheMod.AutoZoomToMapSize == true) { @@ -193,6 +195,7 @@ private void Events_Input_ButtonPressed(object sender, ButtonPressedEventArgs e) { if (Game1.viewport.Y > 0) { + wasCameraFrozen = true; Game1.viewportFreeze = true; Game1.viewport.Y -= configsForTheMod.CameraMovementSpeed; } @@ -202,6 +205,7 @@ private void Events_Input_ButtonPressed(object sender, ButtonPressedEventArgs e) { if (Game1.viewport.Y < Game1.currentLocation.map.DisplayHeight - Game1.viewport.Height) { + wasCameraFrozen = true; Game1.viewportFreeze = true; Game1.viewport.Y += configsForTheMod.CameraMovementSpeed; } @@ -211,6 +215,7 @@ private void Events_Input_ButtonPressed(object sender, ButtonPressedEventArgs e) { if (Game1.viewport.X > 0) { + wasCameraFrozen = true; Game1.viewportFreeze = true; Game1.viewport.X -= configsForTheMod.CameraMovementSpeed; } @@ -220,13 +225,15 @@ private void Events_Input_ButtonPressed(object sender, ButtonPressedEventArgs e) { if (Game1.viewport.X < Game1.currentLocation.map.DisplayWidth - Game1.viewport.Width) { + wasCameraFrozen = true; Game1.viewportFreeze = true; Game1.viewport.X += configsForTheMod.CameraMovementSpeed; } wasThePreviousButtonPressSucessfull = true; } - else if (Game1.viewportFreeze == true && (configsForTheMod.KeybindListResetCameraMovement.JustPressed() || configsForTheMod.PressAnyButtonToCenterCamera == true)) + else if (wasCameraFrozen == true && Game1.viewportFreeze == true && (configsForTheMod.KeybindListResetCameraMovement.JustPressed() || configsForTheMod.PressAnyButtonToCenterCamera == true)) { + wasCameraFrozen = false; Game1.viewportFreeze = false; wasThePreviousButtonPressSucessfull = true; } diff --git a/ZoomLevel/manifest.json b/ZoomLevel/manifest.json index 241d8e2..905580a 100644 --- a/ZoomLevel/manifest.json +++ b/ZoomLevel/manifest.json @@ -1,7 +1,7 @@ { "Name": "Zoom Level", "Author": "thespbgamer", - "Version": "2.0.0", + "Version": "2.0.1", "Description": "Change the Zoom and UI levels with a simple keybind.Now with camera position change!", "UniqueID": "thespbgamer.ZoomLevel", "EntryDll": "ZoomLevel.dll",