From b919c55ef1b2e7c5109c1889e7a67684ca19ef30 Mon Sep 17 00:00:00 2001 From: Atony <75191600+AtonyGit@users.noreply.github.com> Date: Wed, 5 Aug 2026 11:55:30 -0500 Subject: [PATCH] Fix advanced role settings being unscrollable --- MiraAPI/Patches/Options/RoleSettingMenuPatches.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs index 723735c..69b21d3 100644 --- a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs +++ b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs @@ -381,7 +381,7 @@ public static class RoleSettingMenuPatches } } - private static void SetScrollBounds(this Scroller scroller, RolesSettingsMenu roleMenu) + private static void SetScrollBounds(this Scroller scroller, RolesSettingsMenu roleMenu, bool isRolesConfig = false) { if (MenuState.Instance.CurrentModIdx == 0) { @@ -389,6 +389,15 @@ public static class RoleSettingMenuPatches return; } + if (isRolesConfig) + { + scroller.Inner = roleMenu.AdvancedRolesSettings.transform; + } + else + { + scroller.Inner = MenuState.Instance.CurrentContainer.transform; + } + scroller.SetYBoundsMax(-ScrollerNum - 2); } @@ -402,7 +411,6 @@ public static class RoleSettingMenuPatches var hasImage = CurrentRole.RoleScreenshot != null; var num = hasImage ? -0.872f : -1; - foreach (var opt in CurrentRoleOptions) { if (opt.OptionBehaviour == null) continue; @@ -616,6 +624,7 @@ public static class RoleSettingMenuPatches __instance.RoleChancesSettings.SetActive(false); __instance.AdvancedRolesSettings.SetActive(true); + __instance.scrollBar.SetScrollBounds(__instance, true); __instance.RefreshChildren(); }