public static void Postfix(MechLabInventoryWidget __instance) { if (__instance.gameObject.activeInHierarchy) { __instance.StartCoroutine(EndOfFrameScrollBarMovement(__instance)); } }
public static void Postfix(MechLabInventoryWidget __instance) { // when a filter is applied, permit the default behaviour (scroll to top) unless we're in the mech bay if (m_scrollAfterFilter) { m_scrollAfterFilter = false; if (__instance.gameObject.activeInHierarchy) { __instance.StartCoroutine(EndOfFrameScrollBarMovement(__instance)); } } //Log($"resetting selection index"); m_selectedIdx = -1; // reset selection on filter as it will scroll to the top }