Skip to content

Commit

Permalink
fix: block scrollweel zoom with InputBlocked (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Sep 26, 2023
1 parent 4bc3a36 commit 292be08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Version 2.14.1
* Fixed some errors when a Jotunn depend mod has no BepInEx dependency set and loads before Jotunn. A warning will be logged
* Fixed items were not added to the main menu ObjectDB if added in OnVanillaPrefabsAvailable event and thus not visually shown on the player
* Fixed input block did not prevent scrollwheel zoom

## Version 2.14.0
* Fixed the SynchronizationManager wasn't always initialised, resulting in no sync of admin configs
Expand Down
6 changes: 4 additions & 2 deletions JotunnLib/Managers/GUIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,10 @@ private static class Patches
[HarmonyPatch(typeof(TextInput), nameof(TextInput.IsVisible)), HarmonyPostfix]
private static void TextInputPatch(ref bool __result) => TextInput_IsVisible(ref __result);

[HarmonyPatch(typeof(InventoryGui), nameof(InventoryGui.Update)), HarmonyTranspiler, HarmonyWrapSafe]
private static IEnumerable<CodeInstruction> InventoryGui_Update(IEnumerable<CodeInstruction> instructions) => BlockUseTranspiler(instructions);
[HarmonyPatch(typeof(InventoryGui), nameof(InventoryGui.Update))]
[HarmonyPatch(typeof(GameCamera), nameof(GameCamera.UpdateCamera))]
[HarmonyTranspiler, HarmonyWrapSafe]
private static IEnumerable<CodeInstruction> BlockUsePatch(IEnumerable<CodeInstruction> instructions) => BlockUseTranspiler(instructions);

[HarmonyPatch(typeof(FejdStartup), nameof(FejdStartup.SetupGui))]
[HarmonyPatch(typeof(Game), nameof(Game.Start))]
Expand Down

0 comments on commit 292be08

Please sign in to comment.