From e431c82ba68a729c0b64ccacaa704f0bad968daa Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:51:03 -0700 Subject: [PATCH] fix dropdown heights --- Patches/FixFleaPatches.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Patches/FixFleaPatches.cs b/Patches/FixFleaPatches.cs index 7077412..e088180 100644 --- a/Patches/FixFleaPatches.cs +++ b/Patches/FixFleaPatches.cs @@ -13,9 +13,10 @@ public static class FixFleaPatches { public static void Enable() { - // These two are anal AF + // These are anal AF new DoNotToggleOnMouseOverPatch().Enable(); new ToggleOnOpenPatch().Enable(); + new DropdownHeightPatch().Enable(); new OfferItemFixMaskPatch().Enable(); new OfferViewTweaksPatch().Enable(); @@ -129,4 +130,21 @@ public static class FixFleaPatches return false; } } + + public class DropdownHeightPatch : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + return AccessTools.DeclaredMethod(typeof(DropDownBox), nameof(DropDownBox.Init)); + } + + [PatchPostfix] + public static void Postfix(ref float ____maxVisibleHeight) + { + if (____maxVisibleHeight == 120f) + { + ____maxVisibleHeight = 240f; + } + } + } }