Snap keybinds only apply to top window

This commit is contained in:
Tyfon
2024-05-31 18:45:07 -07:00
parent 6da8800d97
commit c3d97b31c3

View File

@@ -245,12 +245,13 @@ namespace UIFixes
[PatchPostfix]
public static void Postfix(ItemSpecificationPanel __instance)
{
if (Settings.SnapLeftKeybind.Value.IsDown())
bool isTopWindow = __instance.transform.GetSiblingIndex() == __instance.transform.parent.childCount - 1;
if (Settings.SnapLeftKeybind.Value.IsDown() && isTopWindow)
{
SnapLeft(__instance);
}
if (Settings.SnapRightKeybind.Value.IsDown())
if (Settings.SnapRightKeybind.Value.IsDown() && isTopWindow)
{
SnapRight(__instance);
}