diff --git a/DrawMultiSelect.cs b/DrawMultiSelect.cs index c73e9e5..c801fc7 100644 --- a/DrawMultiSelect.cs +++ b/DrawMultiSelect.cs @@ -68,12 +68,15 @@ namespace UIFixes foreach (GameObject gameObject in results.Select(r => r.gameObject)) { - var dragInterfaces = gameObject.GetComponents() + var draggables = gameObject.GetComponents() .Where(c => c is IDragHandler || c is IBeginDragHandler) .Where(c => c is not ScrollRectNoDrag) // this disables scrolling, it doesn't add it .Where(c => c.name != "Inner"); // there's a random DragTrigger sitting in ItemInfoWindows - if (dragInterfaces.Any()) + var clickables = gameObject.GetComponents() + .Where(c => c is IPointerClickHandler || c is IPointerDownHandler || c is IPointerUpHandler); + + if (draggables.Any() || clickables.Any()) { return; } diff --git a/MultiSelect.cs b/MultiSelect.cs index 7ddf0c1..55148ef 100644 --- a/MultiSelect.cs +++ b/MultiSelect.cs @@ -177,7 +177,7 @@ namespace UIFixes public static void ShowDragCount(DraggedItemView draggedItemView) { - if (Count > 1) + if (draggedItemView != null && Count > 1) { GameObject textOverlay = new("MultiSelectText", [typeof(RectTransform), typeof(TextMeshProUGUI)]); textOverlay.transform.parent = draggedItemView.transform;