浏览代码

Merge pull request #168 from UnityTech/slider

remove utils folder
/main
GitHub 6 年前
当前提交
b4fb4f7b
共有 7 个文件被更改,包括 25 次插入14 次删除
  1. 1
      Runtime/material/mergeable_material.cs
  2. 17
      Runtime/painting/basic_types.cs
  3. 1
      Runtime/widgets/basic.cs
  4. 11
      Runtime/widgets/drag_target.cs
  5. 1
      Runtime/widgets/single_child_scroll_view.cs
  6. 8
      Runtime/utils.meta

1
Runtime/material/mergeable_material.cs


using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.utils;
using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.material {

17
Runtime/painting/basic_types.cs


using System;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
namespace Unity.UIWidgets.painting {
public enum RenderComparison {

right,
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 {

1
Runtime/widgets/basic.cs


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;

11
Runtime/widgets/drag_target.cs


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);

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 {

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)));
}
}

1
Runtime/widgets/single_child_scroll_view.cs


using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.utils;
using UnityEngine;
using Rect = Unity.UIWidgets.ui.Rect;

8
Runtime/utils.meta


fileFormatVersion: 2
guid: 963d1b7d830374b3a915967d4721dc4a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存