Skip to content

Commit

Permalink
Co-op Working.
Browse files Browse the repository at this point in the history
Increased Minimum Api Version
  • Loading branch information
thespbgamer committed Apr 9, 2021
1 parent d5f6239 commit aac7417
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
25 changes: 21 additions & 4 deletions ZoomLevel/ModEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,21 @@ private void ChangeZoomLevel(float amount = 0)
//Caps Max Zoom Out Level
Game1.options.singlePlayerBaseZoomLevel = Game1.options.singlePlayerBaseZoomLevel <= modConfigs.MaxZoomOutLevelValue ? modConfigs.MaxZoomOutLevelValue : Game1.options.singlePlayerBaseZoomLevel;

//Monitor Current Zoom Level
//this.Monitor.Log($"{Game1.options.singlePlayerBaseZoomLevel}.", LogLevel.Debug);
Program.gamePtr.refreshWindowSettings();
}
else if (Context.IsSplitScreen)
{
//this.Monitor.Log("There's no support for splitscreen.", LogLevel.Info);
//Changes ZoomLevel
Game1.options.localCoopBaseZoomLevel = (float)Math.Round(Game1.options.localCoopBaseZoomLevel + amount, 2);

//Caps Max Zoom In Level
Game1.options.localCoopBaseZoomLevel = Game1.options.localCoopBaseZoomLevel >= modConfigs.MaxZoomInLevelValue ? modConfigs.MaxZoomInLevelValue : Game1.options.localCoopBaseZoomLevel;

//Caps Max Zoom Out Level
Game1.options.localCoopBaseZoomLevel = Game1.options.localCoopBaseZoomLevel <= modConfigs.MaxZoomOutLevelValue ? modConfigs.MaxZoomOutLevelValue : Game1.options.localCoopBaseZoomLevel;
}
Program.gamePtr.refreshWindowSettings();
}

private void ChangeUILevel(float amount = 0)
Expand All @@ -90,13 +98,22 @@ private void ChangeUILevel(float amount = 0)
//Caps Max UI Zoom Out Level
Game1.options.singlePlayerDesiredUIScale = Game1.options.singlePlayerDesiredUIScale <= modConfigs.MaxZoomOutLevelValue ? modConfigs.MaxZoomOutLevelValue : Game1.options.singlePlayerDesiredUIScale;

//Monitor Current UI Level
//this.Monitor.Log($"{Game1.options.singlePlayerDesiredUIScale}.", LogLevel.Debug);
Program.gamePtr.refreshWindowSettings();
}
else if (Context.IsSplitScreen)
{
//this.Monitor.Log("There's no support for splitscreen.", LogLevel.Info);
//Changes UI Zoom Level
Game1.options.localCoopDesiredUIScale = (float)Math.Round(Game1.options.localCoopDesiredUIScale + amount, 2);

//Caps Max UI Zoom In Level
Game1.options.localCoopDesiredUIScale = Game1.options.localCoopDesiredUIScale >= modConfigs.MaxZoomInLevelValue ? modConfigs.MaxZoomInLevelValue : Game1.options.localCoopDesiredUIScale;

//Caps Max UI Zoom Out Level
Game1.options.localCoopDesiredUIScale = Game1.options.localCoopDesiredUIScale <= modConfigs.MaxZoomOutLevelValue ? modConfigs.MaxZoomOutLevelValue : Game1.options.localCoopDesiredUIScale;
}

Program.gamePtr.refreshWindowSettings();
}
}
}
4 changes: 2 additions & 2 deletions ZoomLevel/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"Name": "ZoomLevel",
"Author": "thespbgamer",
"Version": "1.3.0",
"Version": "1.4.0",
"Description": "Mod that changes the zoom level with a simple keybind.",
"UniqueID": "thespbgamer.ZoomLevel",
"EntryDll": "ZoomLevel.dll",
"MinimumApiVersion": "3.9.0",
"MinimumApiVersion": "3.9.5",
"UpdateKeys": [ "GitHub:thespbgamer/ZoomLevel", "Nexus:7363" ]
}

0 comments on commit aac7417

Please sign in to comment.