From 3fabe85a184c85f0aec23dc7d8ec15622ba45338 Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Sat, 5 Apr 2025 15:00:35 -0400 Subject: [PATCH] fix scroller in freeplay role menu --- MiraAPI/Patches/Freeplay/TaskAdderPatches.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MiraAPI/Patches/Freeplay/TaskAdderPatches.cs b/MiraAPI/Patches/Freeplay/TaskAdderPatches.cs index 666a1ea..e06e3f0 100644 --- a/MiraAPI/Patches/Freeplay/TaskAdderPatches.cs +++ b/MiraAPI/Patches/Freeplay/TaskAdderPatches.cs @@ -18,7 +18,7 @@ namespace MiraAPI.Patches.Freeplay; [HarmonyPatch(typeof(TaskAdderGame))] internal static class TaskAdderPatches { - private static Scroller? _scroller; + private static Scroller _scroller = null!; [HarmonyPostfix] [HarmonyPatch(nameof(TaskAdderGame.Begin))] @@ -293,9 +293,9 @@ internal static class TaskAdderPatches chip.GetComponent().maskInteraction = SpriteMaskInteraction.VisibleInsideMask; } - if (_scroller && _scroller != null) + if (_scroller) { - _scroller.CalculateAndSetYBounds(__instance.ActiveItems.Count, 6, 3, 1f); + _scroller.CalculateAndSetYBounds(__instance.ActiveItems.Count, 6, 5, 1.4f); _scroller.SetYBoundsMin(0.0f); _scroller.ScrollToTop(); }