Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Runtime/material/mergeable_material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.utils;
using Unity.UIWidgets.widgets;

namespace Unity.UIWidgets.material {
Expand Down
17 changes: 17 additions & 0 deletions Runtime/painting/basic_types.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;

namespace Unity.UIWidgets.painting {
public enum RenderComparison {
Expand All @@ -26,6 +27,22 @@ public enum AxisDirection {
down,
left,
}

public static class AxisDirectionUtils {
public static AxisDirection? getAxisDirectionFromAxisReverseAndDirectionality(
BuildContext context,
Axis axis,
bool reverse) {
switch (axis) {
case Axis.horizontal:
return reverse ? AxisDirection.left : AxisDirection.right;
case Axis.vertical:
return reverse ? AxisDirection.up : AxisDirection.down;
}

return null;
}
}

public static class AxisUtils {
public static Axis flipAxis(Axis direction) {
Expand Down
8 changes: 0 additions & 8 deletions Runtime/utils.meta

This file was deleted.

20 changes: 0 additions & 20 deletions Runtime/utils/axis_direction.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/utils/axis_direction.cs.meta

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/utils/drag_utils.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/utils/drag_utils.cs.meta

This file was deleted.

1 change: 0 additions & 1 deletion Runtime/widgets/basic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.utils;
using UnityEngine;
using Color = Unity.UIWidgets.ui.Color;
using Rect = Unity.UIWidgets.ui.Rect;
Expand Down
11 changes: 8 additions & 3 deletions Runtime/widgets/drag_target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.utils;

namespace Unity.UIWidgets.widgets {
public delegate bool DragTargetWillAccept<T>(T data);
Expand All @@ -24,6 +23,12 @@ public enum DragAnchor {
child,
pointer
}

static class _DragUtils {
public static List<T> _mapAvatarsToData<T>(List<_DragAvatar<T>> avatars) {
return avatars.Select(avatar => avatar.data).ToList();
}
}

public class Draggable<T> : StatefulWidget {
public Draggable(
Expand Down Expand Up @@ -364,8 +369,8 @@ public override Widget build(BuildContext context) {
return new MetaData(
metaData: this,
behavior: HitTestBehavior.translucent,
child: this.widget.builder(context, DragUtils._mapAvatarsToData(this._candidateAvatars),
DragUtils._mapAvatarsToData(this._rejectedAvatars)));
child: this.widget.builder(context, _DragUtils._mapAvatarsToData(this._candidateAvatars),
_DragUtils._mapAvatarsToData(this._rejectedAvatars)));
}
}

Expand Down
1 change: 0 additions & 1 deletion Runtime/widgets/single_child_scroll_view.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.utils;
using UnityEngine;
using Rect = Unity.UIWidgets.ui.Rect;

Expand Down