don't select when alt or ctrl are down

This commit is contained in:
Tyfon
2024-06-20 03:36:26 -07:00
parent fa5fde5dcd
commit 987dad1359

View File

@@ -146,7 +146,11 @@ namespace UIFixes
return; return;
} }
if (__instance is GridItemView gridItemView && eventData.button == PointerEventData.InputButton.Left && (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))) bool ctrlDown = Input.GetKey(KeyCode.LeftControl) && !Input.GetKey(KeyCode.RightControl);
bool shiftDown = Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.RightShift);
bool altDown = Input.GetKey(KeyCode.LeftAlt) && !Input.GetKey(KeyCode.RightAlt);
if (__instance is GridItemView gridItemView && eventData.button == PointerEventData.InputButton.Left && shiftDown && !ctrlDown && !altDown)
{ {
MultiSelect.Toggle(gridItemView); MultiSelect.Toggle(gridItemView);
return; return;
@@ -271,7 +275,7 @@ namespace UIFixes
} }
[PatchPrefix] [PatchPrefix]
public static bool Prefix(GClass3021 __instance, EItemInfoButton interaction, ItemUiContext ___itemUiContext_1) public static bool Prefix(EItemInfoButton interaction, ItemUiContext ___itemUiContext_1)
{ {
if (!MultiSelect.Active) if (!MultiSelect.Active)
{ {