don't start selection box on clickables
This commit is contained in:
@@ -68,12 +68,15 @@ namespace UIFixes
|
|||||||
|
|
||||||
foreach (GameObject gameObject in results.Select(r => r.gameObject))
|
foreach (GameObject gameObject in results.Select(r => r.gameObject))
|
||||||
{
|
{
|
||||||
var dragInterfaces = gameObject.GetComponents<MonoBehaviour>()
|
var draggables = gameObject.GetComponents<MonoBehaviour>()
|
||||||
.Where(c => c is IDragHandler || c is IBeginDragHandler)
|
.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 is not ScrollRectNoDrag) // this disables scrolling, it doesn't add it
|
||||||
.Where(c => c.name != "Inner"); // there's a random DragTrigger sitting in ItemInfoWindows
|
.Where(c => c.name != "Inner"); // there's a random DragTrigger sitting in ItemInfoWindows
|
||||||
|
|
||||||
if (dragInterfaces.Any())
|
var clickables = gameObject.GetComponents<MonoBehaviour>()
|
||||||
|
.Where(c => c is IPointerClickHandler || c is IPointerDownHandler || c is IPointerUpHandler);
|
||||||
|
|
||||||
|
if (draggables.Any() || clickables.Any())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ namespace UIFixes
|
|||||||
|
|
||||||
public static void ShowDragCount(DraggedItemView draggedItemView)
|
public static void ShowDragCount(DraggedItemView draggedItemView)
|
||||||
{
|
{
|
||||||
if (Count > 1)
|
if (draggedItemView != null && Count > 1)
|
||||||
{
|
{
|
||||||
GameObject textOverlay = new("MultiSelectText", [typeof(RectTransform), typeof(TextMeshProUGUI)]);
|
GameObject textOverlay = new("MultiSelectText", [typeof(RectTransform), typeof(TextMeshProUGUI)]);
|
||||||
textOverlay.transform.parent = draggedItemView.transform;
|
textOverlay.transform.parent = draggedItemView.transform;
|
||||||
|
|||||||
Reference in New Issue
Block a user