fix dropdown heights

This commit is contained in:
Tyfon
2024-07-20 13:51:03 -07:00
parent 94b080159d
commit e431c82ba6

View File

@@ -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;
}
}
}
}