Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit e9c1a03

Browse files
committed
remove utils folder
1 parent a2fe17f commit e9c1a03

File tree

10 files changed

+25
-67
lines changed

10 files changed

+25
-67
lines changed

Runtime/material/mergeable_material.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Unity.UIWidgets.painting;
55
using Unity.UIWidgets.rendering;
66
using Unity.UIWidgets.ui;
7-
using Unity.UIWidgets.utils;
87
using Unity.UIWidgets.widgets;
98

109
namespace Unity.UIWidgets.material {

Runtime/painting/basic_types.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using Unity.UIWidgets.ui;
3+
using Unity.UIWidgets.widgets;
34

45
namespace Unity.UIWidgets.painting {
56
public enum RenderComparison {
@@ -26,6 +27,22 @@ public enum AxisDirection {
2627
down,
2728
left,
2829
}
30+
31+
public static class AxisDirectionUtils {
32+
public static AxisDirection? getAxisDirectionFromAxisReverseAndDirectionality(
33+
BuildContext context,
34+
Axis axis,
35+
bool reverse) {
36+
switch (axis) {
37+
case Axis.horizontal:
38+
return reverse ? AxisDirection.left : AxisDirection.right;
39+
case Axis.vertical:
40+
return reverse ? AxisDirection.up : AxisDirection.down;
41+
}
42+
43+
return null;
44+
}
45+
}
2946

3047
public static class AxisUtils {
3148
public static Axis flipAxis(Axis direction) {

Runtime/utils.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Runtime/utils/axis_direction.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

Runtime/utils/axis_direction.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/utils/drag_utils.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/utils/drag_utils.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/widgets/basic.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Unity.UIWidgets.painting;
66
using Unity.UIWidgets.rendering;
77
using Unity.UIWidgets.ui;
8-
using Unity.UIWidgets.utils;
98
using UnityEngine;
109
using Color = Unity.UIWidgets.ui.Color;
1110
using Rect = Unity.UIWidgets.ui.Rect;

Runtime/widgets/drag_target.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Unity.UIWidgets.painting;
66
using Unity.UIWidgets.rendering;
77
using Unity.UIWidgets.ui;
8-
using Unity.UIWidgets.utils;
98

109
namespace Unity.UIWidgets.widgets {
1110
public delegate bool DragTargetWillAccept<T>(T data);
@@ -24,6 +23,12 @@ public enum DragAnchor {
2423
child,
2524
pointer
2625
}
26+
27+
static class _DragUtils {
28+
public static List<T> _mapAvatarsToData<T>(List<_DragAvatar<T>> avatars) {
29+
return avatars.Select(avatar => avatar.data).ToList();
30+
}
31+
}
2732

2833
public class Draggable<T> : StatefulWidget {
2934
public Draggable(
@@ -364,8 +369,8 @@ public override Widget build(BuildContext context) {
364369
return new MetaData(
365370
metaData: this,
366371
behavior: HitTestBehavior.translucent,
367-
child: this.widget.builder(context, DragUtils._mapAvatarsToData(this._candidateAvatars),
368-
DragUtils._mapAvatarsToData(this._rejectedAvatars)));
372+
child: this.widget.builder(context, _DragUtils._mapAvatarsToData(this._candidateAvatars),
373+
_DragUtils._mapAvatarsToData(this._rejectedAvatars)));
369374
}
370375
}
371376

Runtime/widgets/single_child_scroll_view.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Unity.UIWidgets.painting;
66
using Unity.UIWidgets.rendering;
77
using Unity.UIWidgets.ui;
8-
using Unity.UIWidgets.utils;
98
using UnityEngine;
109
using Rect = Unity.UIWidgets.ui.Rect;
1110

0 commit comments

Comments
 (0)