Fix scrolling on item transfer

This commit is contained in:
Tyfon
2024-04-20 01:17:16 -07:00
parent 972045c793
commit 703f38563d

View File

@@ -132,6 +132,11 @@ namespace UIFixes
[PatchPrefix] [PatchPrefix]
private static void Prefix(SimpleStashPanel __instance, ScrollRect ____stashScroll) private static void Prefix(SimpleStashPanel __instance, ScrollRect ____stashScroll)
{ {
if (____stashScroll == null)
{
// For some reason, sometimes SimpleStashPanel doesn't have a reference to its own ScrollRect?
____stashScroll = __instance.GetComponentInChildren<ScrollRect>();
}
HandleInput(____stashScroll); HandleInput(____stashScroll);
} }