From fc7eaef7c403e154c72e7fb49d1e169571056262 Mon Sep 17 00:00:00 2001 From: Atony <75191600+AtonyGit@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:53:50 -0500 Subject: [PATCH] Add proper scroller implementation for tab --- MiraAPI/Patches/RoleGuidePatches.cs | 2 ++ MiraAPI/Roles/ICustomRole.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/MiraAPI/Patches/RoleGuidePatches.cs b/MiraAPI/Patches/RoleGuidePatches.cs index 390e3e7..e1ae59c 100644 --- a/MiraAPI/Patches/RoleGuidePatches.cs +++ b/MiraAPI/Patches/RoleGuidePatches.cs @@ -345,6 +345,8 @@ public static class RoleGuidePatches CurrentAdvancedTabObject.transform.SetParent(AdvancedWikiTab.Inner.transform); desc.transform.localPosition = new Vector3(0, 1.125f, 0); CurrentAdvancedTabObject.transform.localPosition = new Vector3(0f, 0f, 0f); + desc.ForceMeshUpdate(); + AdvancedWikiTab.SetYBoundsMax(Mathf.Clamp(desc.textBounds.size.y- 2, 0f, 999f)); } } [HarmonyPrefix] diff --git a/MiraAPI/Roles/ICustomRole.cs b/MiraAPI/Roles/ICustomRole.cs index 25c83c1..d495298 100644 --- a/MiraAPI/Roles/ICustomRole.cs +++ b/MiraAPI/Roles/ICustomRole.cs @@ -327,6 +327,8 @@ public interface ICustomRole : IOptionable desc.alignment = TextAlignmentOptions.TopLeft; obj.transform.SetParent(parent.Inner.transform); desc.transform.localPosition = new Vector3(0, 1.125f, 0); + desc.ForceMeshUpdate(); + parent.SetYBoundsMax(Mathf.Clamp(desc.textBounds.size.y - 2, 0f, 999f)); return obj; }