GitHub
6 年前
当前提交
302c2b32
共有 102 个文件被更改,包括 3913 次插入 和 949 次删除
-
20Runtime/foundation/change_notifier.cs
-
24Runtime/gestures/binding.cs
-
2Runtime/gestures/hit_test.cs
-
140Runtime/gestures/long_press.cs
-
24Runtime/gestures/recognizer.cs
-
70Runtime/material/app.cs
-
38Runtime/material/app_bar.cs
-
40Runtime/material/bottom_app_bar.cs
-
204Runtime/material/bottom_navigation_bar.cs
-
1Runtime/material/bottom_sheet.cs
-
37Runtime/material/button.cs
-
2Runtime/material/button_theme.cs
-
27Runtime/material/card.cs
-
10Runtime/material/chip.cs
-
1Runtime/material/chip_theme.cs
-
74Runtime/material/dialog.cs
-
64Runtime/material/dialog_theme.cs
-
11Runtime/material/drawer.cs
-
3Runtime/material/dropdown.cs
-
11Runtime/material/expansion_tile.cs
-
17Runtime/material/flexible_space_bar.cs
-
72Runtime/material/float_action_button.cs
-
114Runtime/material/float_action_button_location.cs
-
206Runtime/material/input_decorator.cs
-
19Runtime/material/list_tile.cs
-
31Runtime/material/material.cs
-
1Runtime/material/material_button.cs
-
72Runtime/material/outline_button.cs
-
118Runtime/material/page_transitions_theme.cs
-
50Runtime/material/reorderable_list.cs
-
88Runtime/material/scaffold.cs
-
75Runtime/material/switch.cs
-
26Runtime/material/tab_bar_theme.cs
-
44Runtime/material/tabs.cs
-
147Runtime/material/text_field.cs
-
54Runtime/material/text_theme.cs
-
50Runtime/material/theme_data.cs
-
103Runtime/painting/image_cache.cs
-
16Runtime/painting/image_stream.cs
-
2Runtime/painting/notched_shapes.cs
-
82Runtime/painting/text_painter.cs
-
3Runtime/rendering/binding.cs
-
353Runtime/rendering/editable.cs
-
8Runtime/rendering/layer.cs
-
2Runtime/rendering/object.cs
-
10Runtime/rendering/proxy_box.cs
-
6Runtime/rendering/sliver.cs
-
2Runtime/rendering/sliver_multi_box_adaptor.cs
-
10Runtime/rendering/sliver_persistent_header.cs
-
3Runtime/rendering/table.cs
-
51Runtime/rendering/viewport.cs
-
4Runtime/service/text_formatter.cs
-
79Runtime/service/text_input.cs
-
5Runtime/widgets/app.cs
-
45Runtime/widgets/basic.cs
-
8Runtime/widgets/binding.cs
-
11Runtime/widgets/debug.cs
-
117Runtime/widgets/dismissible.cs
-
321Runtime/widgets/editable_text.cs
-
30Runtime/widgets/focus_manager.cs
-
22Runtime/widgets/focus_scope.cs
-
10Runtime/widgets/framework.cs
-
50Runtime/widgets/gesture_detector.cs
-
6Runtime/widgets/icon_theme_data.cs
-
3Runtime/widgets/image.cs
-
2Runtime/widgets/implicit_animations.cs
-
17Runtime/widgets/media_query.cs
-
105Runtime/widgets/navigator.cs
-
3Runtime/widgets/notification_listener.cs
-
3Runtime/widgets/overlay.cs
-
8Runtime/widgets/page_view.cs
-
1Runtime/widgets/routes.cs
-
120Runtime/widgets/scroll_view.cs
-
28Runtime/widgets/scrollable.cs
-
3Runtime/widgets/selectable_text.cs
-
6Runtime/widgets/single_child_scroll_view.cs
-
24Runtime/widgets/text_selection.cs
-
4Runtime/widgets/transitions.cs
-
3Runtime/widgets/widget_inspector.cs
-
1Samples/ReduxSample/ObjectFinder/ObjectFinderApp.cs
-
3Samples/UIWidgetSample/AsScreenSample.cs
-
163Samples/UIWidgetSample/MaterialSample.cs
-
63Samples/UIWidgetSample/TextInputSample.cs
-
10Samples/UIWidgetSample/txt/TextFieldSample.cs
-
2Samples/UIWidgetsGallery/demo/material/bottom_app_bar_demo.cs
-
19Tests/Editor/RenderEditable.cs
-
7Runtime/foundation/constants.cs
-
3Runtime/foundation/constants.cs.meta
-
112Runtime/material/app_bar_theme.cs
-
3Runtime/material/app_bar_theme.cs.meta
-
92Runtime/material/bottom_app_bar_theme.cs
-
3Runtime/material/bottom_app_bar_theme.cs.meta
-
89Runtime/material/card_theme.cs
-
3Runtime/material/card_theme.cs.meta
-
45Samples/UIWidgetSample/LongPressSample.cs
-
3Samples/UIWidgetSample/LongPressSample.cs.meta
-
468Samples/UIWidgetSample/LongPressSample.unity
-
7Samples/UIWidgetSample/LongPressSample.unity.meta
-
87Samples/UIWidgetSample/MaterialThemeSample.cs
-
3Samples/UIWidgetSample/MaterialThemeSample.cs.meta
|
|||
using UnityEngine; |
|||
|
|||
namespace Unity.UIWidgets.foundation { |
|||
public class FoundationConstants { |
|||
public static bool kReleaseMode = !Debug.isDebugBuild; |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 36d19e17f3d947f98c7accec2cd5771b |
|||
timeCreated: 1556097117 |
|
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.service; |
|||
using Unity.UIWidgets.ui; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace Unity.UIWidgets.material { |
|||
public class AppBarTheme : Diagnosticable { |
|||
public AppBarTheme( |
|||
Brightness? brightness = null, |
|||
Color color = null, |
|||
float? elevation = null, |
|||
IconThemeData iconTheme = null, |
|||
TextTheme textTheme = null |
|||
) { |
|||
this.brightness = brightness; |
|||
this.color = color; |
|||
this.elevation = elevation; |
|||
this.iconTheme = iconTheme; |
|||
this.textTheme = textTheme; |
|||
} |
|||
|
|||
public readonly Brightness? brightness; |
|||
|
|||
public readonly Color color; |
|||
|
|||
public readonly float? elevation; |
|||
|
|||
public readonly IconThemeData iconTheme; |
|||
|
|||
public readonly TextTheme textTheme; |
|||
|
|||
AppBarTheme copyWith( |
|||
Brightness? brightness = null, |
|||
Color color = null, |
|||
float? elevation = null, |
|||
IconThemeData iconTheme = null, |
|||
TextTheme textTheme = null |
|||
) { |
|||
return new AppBarTheme( |
|||
brightness: brightness ?? this.brightness, |
|||
color: color ?? this.color, |
|||
elevation: elevation ?? this.elevation, |
|||
iconTheme: iconTheme ?? this.iconTheme, |
|||
textTheme: textTheme ?? this.textTheme |
|||
); |
|||
} |
|||
|
|||
public static AppBarTheme of(BuildContext context) { |
|||
return Theme.of(context).appBarTheme; |
|||
} |
|||
|
|||
public static AppBarTheme lerp(AppBarTheme a, AppBarTheme b, float t) { |
|||
return new AppBarTheme( |
|||
brightness: t < 0.5f ? a?.brightness : b?.brightness, |
|||
color: Color.lerp(a?.color, b?.color, t), |
|||
elevation: MathUtils.lerpFloat(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t), |
|||
iconTheme: IconThemeData.lerp(a?.iconTheme, b?.iconTheme, t), |
|||
textTheme: TextTheme.lerp(a?.textTheme, b?.textTheme, t) |
|||
); |
|||
} |
|||
|
|||
public override int GetHashCode() { |
|||
var hashCode = this.brightness?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.color?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.elevation?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.iconTheme?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.textTheme?.GetHashCode() ?? 0; |
|||
return hashCode; |
|||
} |
|||
|
|||
public override bool Equals(object obj) { |
|||
if (ReferenceEquals(null, obj)) { |
|||
return false; |
|||
} |
|||
|
|||
if (ReferenceEquals(this, obj)) { |
|||
return true; |
|||
} |
|||
|
|||
if (obj.GetType() != this.GetType()) { |
|||
return false; |
|||
} |
|||
|
|||
return this.Equals((AppBarTheme) obj); |
|||
} |
|||
|
|||
public static bool operator ==(AppBarTheme left, AppBarTheme right) { |
|||
return Equals(left, right); |
|||
} |
|||
|
|||
public static bool operator !=(AppBarTheme left, AppBarTheme right) { |
|||
return !Equals(left, right); |
|||
} |
|||
|
|||
public bool Equals(AppBarTheme other) { |
|||
return other.brightness == this.brightness |
|||
&& other.color == this.color |
|||
&& other.elevation == this.elevation |
|||
&& other.iconTheme == this.iconTheme |
|||
&& other.textTheme == this.textTheme; |
|||
} |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|||
base.debugFillProperties(properties); |
|||
properties.add(new DiagnosticsProperty<Brightness?>("brightness", this.brightness, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<Color>("color", this.color, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<float?>("elevation", this.elevation, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<IconThemeData>("iconTheme", this.iconTheme, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<TextTheme>("textTheme", this.textTheme, defaultValue: null)); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0c0ee979ef6b4f32a092532c3bdae31e |
|||
timeCreated: 1556178331 |
|
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.ui; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace Unity.UIWidgets.material { |
|||
public class BottomAppBarTheme : Diagnosticable { |
|||
public BottomAppBarTheme( |
|||
Color color = null, |
|||
float? elevation = null, |
|||
NotchedShape shape = null |
|||
) { |
|||
this.color = color; |
|||
this.elevation = elevation; |
|||
this.shape = shape; |
|||
} |
|||
|
|||
public readonly Color color; |
|||
|
|||
public readonly float? elevation; |
|||
|
|||
public readonly NotchedShape shape; |
|||
|
|||
BottomAppBarTheme copyWith( |
|||
Color color = null, |
|||
float? elevation = null, |
|||
NotchedShape shape = null |
|||
) { |
|||
return new BottomAppBarTheme( |
|||
color: color ?? this.color, |
|||
elevation: elevation ?? this.elevation, |
|||
shape: shape ?? this.shape |
|||
); |
|||
} |
|||
|
|||
public static BottomAppBarTheme of(BuildContext context) { |
|||
return Theme.of(context).bottomAppBarTheme; |
|||
} |
|||
|
|||
public static BottomAppBarTheme lerp(BottomAppBarTheme a, BottomAppBarTheme b, float t) { |
|||
return new BottomAppBarTheme( |
|||
color: Color.lerp(a?.color, b?.color, t), |
|||
elevation: MathUtils.lerpFloat(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t), |
|||
shape: t < 0.5f ? a?.shape : b?.shape |
|||
); |
|||
} |
|||
|
|||
public override int GetHashCode() { |
|||
var hashCode = this.color?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.elevation?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.shape?.GetHashCode() ?? 0; |
|||
return hashCode; |
|||
} |
|||
|
|||
public bool Equals(BottomAppBarTheme other) { |
|||
return other.color == this.color |
|||
&& other.elevation == this.elevation |
|||
&& other.shape == this.shape; |
|||
} |
|||
|
|||
public override bool Equals(object obj) { |
|||
if (ReferenceEquals(null, obj)) { |
|||
return false; |
|||
} |
|||
|
|||
if (ReferenceEquals(this, obj)) { |
|||
return true; |
|||
} |
|||
|
|||
if (obj.GetType() != this.GetType()) { |
|||
return false; |
|||
} |
|||
|
|||
return this.Equals((BottomAppBarTheme) obj); |
|||
} |
|||
|
|||
public static bool operator ==(BottomAppBarTheme left, BottomAppBarTheme right) { |
|||
return Equals(left, right); |
|||
} |
|||
|
|||
public static bool operator !=(BottomAppBarTheme left, BottomAppBarTheme right) { |
|||
return !Equals(left, right); |
|||
} |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|||
base.debugFillProperties(properties); |
|||
properties.add(new DiagnosticsProperty<Color>("color", this.color, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<float?>("elevation", this.elevation, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<NotchedShape>("shape", this.shape, defaultValue: null)); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 9c88d19dd1254f4eb6c0c998084832ea |
|||
timeCreated: 1556185402 |
|
|||
using Unity.UIWidgets.foundation; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.ui; |
|||
using Unity.UIWidgets.widgets; |
|||
|
|||
namespace Unity.UIWidgets.material { |
|||
public class CardTheme : Diagnosticable { |
|||
public CardTheme( |
|||
Clip? clipBehavior = null, |
|||
Color color = null, |
|||
float? elevation = null, |
|||
EdgeInsets margin = null, |
|||
ShapeBorder shape = null |
|||
) { |
|||
D.assert(elevation == null || elevation >= 0.0f); |
|||
this.clipBehavior = clipBehavior; |
|||
this.color = color; |
|||
this.elevation = elevation; |
|||
this.margin = margin; |
|||
this.shape = shape; |
|||
} |
|||
|
|||
public readonly Clip? clipBehavior; |
|||
|
|||
public readonly Color color; |
|||
|
|||
public readonly float? elevation; |
|||
|
|||
public readonly EdgeInsets margin; |
|||
|
|||
public readonly ShapeBorder shape; |
|||
|
|||
CardTheme copyWith( |
|||
Clip? clipBehavior = null, |
|||
Color color = null, |
|||
float? elevation = null, |
|||
EdgeInsets margin = null, |
|||
ShapeBorder shape = null |
|||
) { |
|||
return new CardTheme( |
|||
clipBehavior: clipBehavior ?? this.clipBehavior, |
|||
color: color ?? this.color, |
|||
elevation: elevation ?? this.elevation, |
|||
margin: margin ?? this.margin, |
|||
shape: shape ?? this.shape |
|||
); |
|||
} |
|||
|
|||
public static CardTheme of(BuildContext context) { |
|||
return Theme.of(context).cardTheme; |
|||
} |
|||
|
|||
public static CardTheme lerp(CardTheme a, CardTheme b, float t) { |
|||
return new CardTheme( |
|||
clipBehavior: t < 0.5f ? a?.clipBehavior : b?.clipBehavior, |
|||
color: Color.lerp(a?.color, b?.color, t), |
|||
elevation: MathUtils.lerpFloat(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t), |
|||
margin: EdgeInsets.lerp(a?.margin, b?.margin, t), |
|||
shape: ShapeBorder.lerp(a?.shape, b?.shape, t) |
|||
); |
|||
} |
|||
|
|||
public override int GetHashCode() { |
|||
var hashCode = this.clipBehavior?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.color?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.elevation?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.margin?.GetHashCode() ?? 0; |
|||
hashCode = (hashCode * 397) ^ this.shape?.GetHashCode() ?? 0; |
|||
return hashCode; |
|||
} |
|||
|
|||
public bool Equals(CardTheme other) { |
|||
return other.clipBehavior == this.clipBehavior |
|||
&& other.color == this.color |
|||
&& other.elevation == this.elevation |
|||
&& other.margin == this.margin |
|||
&& other.shape == this.shape; |
|||
} |
|||
|
|||
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) { |
|||
base.debugFillProperties(properties); |
|||
properties.add(new DiagnosticsProperty<Clip?>("clipBehavior", this.clipBehavior, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<Color>("color", this.color, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<float?>("elevation", this.elevation, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<EdgeInsets>("margin", this.margin, defaultValue: null)); |
|||
properties.add(new DiagnosticsProperty<ShapeBorder>("shape", this.shape, defaultValue: null)); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d74c4f94f0994a3880425c80ec3d9ba3 |
|||
timeCreated: 1556187816 |
|
|||
using Unity.UIWidgets.animation; |
|||
using Unity.UIWidgets.engine; |
|||
using Unity.UIWidgets.material; |
|||
using Unity.UIWidgets.widgets; |
|||
using UnityEngine; |
|||
|
|||
namespace UIWidgetsSample { |
|||
public class LongPressSample: UIWidgetsSamplePanel { |
|||
|
|||
protected override Widget createWidget() { |
|||
return new WidgetsApp( |
|||
home: new LongPressSampleWidget(), |
|||
pageRouteBuilder: this.pageRouteBuilder); |
|||
} |
|||
} |
|||
|
|||
public class LongPressSampleWidget: StatefulWidget { |
|||
public override State createState() { |
|||
return new _LongPressSampleWidgetState(); |
|||
} |
|||
} |
|||
|
|||
class _LongPressSampleWidgetState : State<LongPressSampleWidget> { |
|||
public override Widget build(BuildContext context) { |
|||
return new GestureDetector( |
|||
onLongPressDragStart: (value) => { |
|||
Debug.Log($"Long Press Drag Start: {value}"); |
|||
}, |
|||
onLongPressDragUpdate: (value) => { |
|||
Debug.Log($"Long Press Drag Update: {value}"); |
|||
}, |
|||
onLongPressDragUp: (value) => { |
|||
Debug.Log($"Long Press Drag Up: {value}"); |
|||
}, |
|||
child: new Center( |
|||
child: new Container( |
|||
width: 200, |
|||
height: 200, |
|||
color: Colors.blue |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5bab4c4cc3a446f280edec6a9d0a4f16 |
|||
timeCreated: 1556594174 |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!29 &1 |
|||
OcclusionCullingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_OcclusionBakeSettings: |
|||
smallestOccluder: 5 |
|||
smallestHole: 0.25 |
|||
backfaceThreshold: 100 |
|||
m_SceneGUID: 00000000000000000000000000000000 |
|||
m_OcclusionCullingData: {fileID: 0} |
|||
--- !u!104 &2 |
|||
RenderSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 9 |
|||
m_Fog: 0 |
|||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} |
|||
m_FogMode: 3 |
|||
m_FogDensity: 0.01 |
|||
m_LinearFogStart: 0 |
|||
m_LinearFogEnd: 300 |
|||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} |
|||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} |
|||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} |
|||
m_AmbientIntensity: 1 |
|||
m_AmbientMode: 0 |
|||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} |
|||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_HaloStrength: 0.5 |
|||
m_FlareStrength: 1 |
|||
m_FlareFadeSpeed: 3 |
|||
m_HaloTexture: {fileID: 0} |
|||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} |
|||
m_DefaultReflectionMode: 0 |
|||
m_DefaultReflectionResolution: 128 |
|||
m_ReflectionBounces: 1 |
|||
m_ReflectionIntensity: 1 |
|||
m_CustomReflection: {fileID: 0} |
|||
m_Sun: {fileID: 0} |
|||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.49641287, b: 0.5748173, a: 1} |
|||
m_UseRadianceAmbientProbe: 0 |
|||
--- !u!157 &3 |
|||
LightmapSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 11 |
|||
m_GIWorkflowMode: 0 |
|||
m_GISettings: |
|||
serializedVersion: 2 |
|||
m_BounceScale: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_EnvironmentLightingMode: 0 |
|||
m_EnableBakedLightmaps: 1 |
|||
m_EnableRealtimeLightmaps: 1 |
|||
m_LightmapEditorSettings: |
|||
serializedVersion: 10 |
|||
m_Resolution: 2 |
|||
m_BakeResolution: 40 |
|||
m_AtlasSize: 1024 |
|||
m_AO: 0 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_Padding: 2 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_LightmapsBakeMode: 1 |
|||
m_TextureCompression: 1 |
|||
m_FinalGather: 0 |
|||
m_FinalGatherFiltering: 1 |
|||
m_FinalGatherRayCount: 256 |
|||
m_ReflectionCompression: 2 |
|||
m_MixedBakeMode: 2 |
|||
m_BakeBackend: 1 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 500 |
|||
m_PVRBounces: 2 |
|||
m_PVRFilterTypeDirect: 0 |
|||
m_PVRFilterTypeIndirect: 0 |
|||
m_PVRFilterTypeAO: 0 |
|||
m_PVRFilteringMode: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 |
|||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 |
|||
m_PVRFilteringAtrousPositionSigmaAO: 1 |
|||
m_ShowResolutionOverlay: 1 |
|||
m_LightingDataAsset: {fileID: 0} |
|||
m_UseShadowmask: 1 |
|||
--- !u!196 &4 |
|||
NavMeshSettings: |
|||
serializedVersion: 2 |
|||
m_ObjectHideFlags: 0 |
|||
m_BuildSettings: |
|||
serializedVersion: 2 |
|||
agentTypeID: 0 |
|||
agentRadius: 0.5 |
|||
agentHeight: 2 |
|||
agentSlope: 45 |
|||
agentClimb: 0.4 |
|||
ledgeDropHeight: 0 |
|||
maxJumpAcrossDistance: 0 |
|||
minRegionArea: 2 |
|||
manualCellSize: 0 |
|||
cellSize: 0.16666667 |
|||
manualTileSize: 0 |
|||
tileSize: 256 |
|||
accuratePlacement: 0 |
|||
debug: |
|||
m_Flags: 0 |
|||
m_NavMeshData: {fileID: 0} |
|||
--- !u!1 &332995326 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 332995329} |
|||
- component: {fileID: 332995328} |
|||
- component: {fileID: 332995327} |
|||
m_Layer: 0 |
|||
m_Name: EventSystem |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &332995327 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 332995326} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_HorizontalAxis: Horizontal |
|||
m_VerticalAxis: Vertical |
|||
m_SubmitButton: Submit |
|||
m_CancelButton: Cancel |
|||
m_InputActionsPerSecond: 10 |
|||
m_RepeatDelay: 0.5 |
|||
m_ForceModuleActive: 0 |
|||
--- !u!114 &332995328 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 332995326} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_FirstSelected: {fileID: 0} |
|||
m_sendNavigationEvents: 1 |
|||
m_DragThreshold: 10 |
|||
--- !u!4 &332995329 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 332995326} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 3 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1301752092 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1301752095} |
|||
- component: {fileID: 1301752094} |
|||
- component: {fileID: 1301752093} |
|||
m_Layer: 0 |
|||
m_Name: Main Camera |
|||
m_TagString: MainCamera |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!81 &1301752093 |
|||
AudioListener: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1301752092} |
|||
m_Enabled: 1 |
|||
--- !u!20 &1301752094 |
|||
Camera: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1301752092} |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_ClearFlags: 1 |
|||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} |
|||
m_projectionMatrixMode: 1 |
|||
m_SensorSize: {x: 36, y: 24} |
|||
m_LensShift: {x: 0, y: 0} |
|||
m_GateFitMode: 2 |
|||
m_FocalLength: 50 |
|||
m_NormalizedViewPortRect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 0 |
|||
width: 1 |
|||
height: 1 |
|||
near clip plane: 0.3 |
|||
far clip plane: 1000 |
|||
field of view: 60 |
|||
orthographic: 0 |
|||
orthographic size: 5 |
|||
m_Depth: -1 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_RenderingPath: -1 |
|||
m_TargetTexture: {fileID: 0} |
|||
m_TargetDisplay: 0 |
|||
m_TargetEye: 3 |
|||
m_HDR: 1 |
|||
m_AllowMSAA: 1 |
|||
m_AllowDynamicResolution: 0 |
|||
m_ForceIntoRT: 0 |
|||
m_OcclusionCulling: 1 |
|||
m_StereoConvergence: 10 |
|||
m_StereoSeparation: 0.022 |
|||
--- !u!4 &1301752095 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1301752092} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 1, z: -10} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1907726269 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1907726273} |
|||
- component: {fileID: 1907726272} |
|||
- component: {fileID: 1907726271} |
|||
- component: {fileID: 1907726270} |
|||
- component: {fileID: 1907726275} |
|||
- component: {fileID: 1907726274} |
|||
m_Layer: 5 |
|||
m_Name: Canvas |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1907726270 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1907726269} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_IgnoreReversedGraphics: 1 |
|||
m_BlockingObjects: 0 |
|||
m_BlockingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
--- !u!114 &1907726271 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1907726269} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_UiScaleMode: 0 |
|||
m_ReferencePixelsPerUnit: 100 |
|||
m_ScaleFactor: 1 |
|||
m_ReferenceResolution: {x: 800, y: 600} |
|||
m_ScreenMatchMode: 0 |
|||
m_MatchWidthOrHeight: 0 |
|||
m_PhysicalUnit: 3 |
|||
m_FallbackScreenDPI: 96 |
|||
m_DefaultSpriteDPI: 96 |
|||
m_DynamicPixelsPerUnit: 1 |
|||
--- !u!223 &1907726272 |
|||
Canvas: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1907726269} |
|||
m_Enabled: 1 |
|||
serializedVersion: 3 |
|||
m_RenderMode: 0 |
|||
m_Camera: {fileID: 0} |
|||
m_PlaneDistance: 100 |
|||
m_PixelPerfect: 0 |
|||
m_ReceivesEvents: 1 |
|||
m_OverrideSorting: 0 |
|||
m_OverridePixelPerfect: 0 |
|||
m_SortingBucketNormalizedSize: 0 |
|||
m_AdditionalShaderChannelsFlag: 0 |
|||
m_SortingLayerID: 0 |
|||
m_SortingOrder: 0 |
|||
m_TargetDisplay: 0 |
|||
--- !u!224 &1907726273 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1907726269} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 0, y: 0, z: 0} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0, y: 0} |
|||
m_AnchorMax: {x: 0, y: 0} |
|||
m_AnchoredPosition: {x: 0, y: 0} |
|||
m_SizeDelta: {x: 0, y: 0} |
|||
m_Pivot: {x: 0, y: 0} |
|||
--- !u!114 &1907726274 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1907726269} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 5bab4c4cc3a446f280edec6a9d0a4f16, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Material: {fileID: 0} |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_RaycastTarget: 1 |
|||
m_OnCullStateChanged: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, |
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
|||
m_Texture: {fileID: 0} |
|||
m_UVRect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 0 |
|||
width: 1 |
|||
height: 1 |
|||
devicePixelRatioOverride: 0 |
|||
antiAliasingOverride: 4 |
|||
--- !u!222 &1907726275 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1907726269} |
|||
m_CullTransparentMesh: 0 |
|||
--- !u!1 &1963403153 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1963403155} |
|||
- component: {fileID: 1963403154} |
|||
m_Layer: 0 |
|||
m_Name: Directional Light |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!108 &1963403154 |
|||
Light: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1963403153} |
|||
m_Enabled: 1 |
|||
serializedVersion: 8 |
|||
m_Type: 1 |
|||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} |
|||
m_Intensity: 1 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 2 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_Lightmapping: 4 |
|||
m_LightShadowCasterMode: 0 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 0 |
|||
--- !u!4 &1963403155 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1963403153} |
|||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} |
|||
m_LocalPosition: {x: 0, y: 3, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: ea79b711dbc434533b52afdbe4e3ec11 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using Unity.UIWidgets.animation; |
|||
using Unity.UIWidgets.engine; |
|||
using Unity.UIWidgets.material; |
|||
using Unity.UIWidgets.painting; |
|||
using Unity.UIWidgets.rendering; |
|||
using Unity.UIWidgets.service; |
|||
using Unity.UIWidgets.ui; |
|||
using Unity.UIWidgets.widgets; |
|||
using UnityEngine; |
|||
using Image = Unity.UIWidgets.widgets.Image; |
|||
|
|||
namespace UIWidgetsSample { |
|||
public class MaterialThemeSample: UIWidgetsSamplePanel { |
|||
|
|||
protected override Widget createWidget() { |
|||
return new MaterialApp( |
|||
home: new MaterialThemeSampleWidget(), |
|||
darkTheme: new ThemeData(primaryColor: Colors.black26) |
|||
); |
|||
} |
|||
|
|||
protected override void OnEnable() { |
|||
FontManager.instance.addFont(Resources.Load<Font>(path: "MaterialIcons-Regular"), "Material Icons"); |
|||
base.OnEnable(); |
|||
} |
|||
} |
|||
|
|||
public class MaterialThemeSampleWidget: StatefulWidget { |
|||
public override State createState() { |
|||
return new _MaterialThemeSampleWidgetState(); |
|||
} |
|||
} |
|||
|
|||
class _MaterialThemeSampleWidgetState : State<MaterialThemeSampleWidget> { |
|||
int _currentIndex = 0; |
|||
public override Widget build(BuildContext context) { |
|||
return new Theme( |
|||
data: new ThemeData( |
|||
appBarTheme: new AppBarTheme( |
|||
color: Colors.purple |
|||
), |
|||
bottomAppBarTheme: new BottomAppBarTheme( |
|||
color: Colors.blue |
|||
), |
|||
cardTheme: new CardTheme( |
|||
color: Colors.red, |
|||
elevation: 2.0f |
|||
) |
|||
), |
|||
child: new Scaffold( |
|||
appBar: new AppBar(title: new Text("Test App Bar Theme")), |
|||
body: new Center( |
|||
child: new Card( |
|||
shape: new RoundedRectangleBorder( |
|||
borderRadius: BorderRadius.all(5.0f) |
|||
), |
|||
child: new Container( |
|||
height: 250, |
|||
child: new Column( |
|||
children: new List<Widget> { |
|||
Image.asset( |
|||
"products/backpack", |
|||
fit: BoxFit.cover, |
|||
width: 200, |
|||
height: 200 |
|||
), |
|||
new Text("Card Theme") |
|||
} |
|||
) |
|||
) |
|||
) |
|||
), |
|||
bottomNavigationBar: new BottomAppBar( |
|||
child: new Row( |
|||
mainAxisSize: MainAxisSize.max, |
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|||
children: new List<Widget> { |
|||
new IconButton(icon: new Icon(Unity.UIWidgets.material.Icons.menu), onPressed: () => { }), |
|||
new IconButton(icon: new Icon(Unity.UIWidgets.material.Icons.account_balance), onPressed: () => { }) |
|||
}) |
|||
) |
|||
) |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f5061bd7b85f4179a65c68ac289a4a58 |
|||
timeCreated: 1556597371 |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue