private bool TryHandlePrimaryAction(bool IsMouseInput) { if (BoundedBag.Autofill && !IBM.IsTransferMultipleModifierHeld && !IBM.IsTransferHalfModifierHeld) { if (!GroupedOptions.IsEmptyMenu && GroupedOptions.HoveredSlot.HasValue) { if (!IsMouseInput || GetAutofillToggleClickableRegion(GroupedOptions.HoveredSlot.Value).Contains(CurrentMousePosition)) { BoundedBag.ToggleItemAutofill(GroupedOptions.GetHoveredItem()); return(true); } } if (!UngroupedOptions.IsEmptyMenu && UngroupedOptions.HoveredSlot.HasValue) { if (!IsMouseInput || GetAutofillToggleClickableRegion(UngroupedOptions.HoveredSlot.Value).Contains(CurrentMousePosition)) { BoundedBag.ToggleItemAutofill(UngroupedOptions.GetHoveredItem()); return(true); } } } return(false); }