浏览代码

Merge branch 'master' of github.com:UnityTech/UIWidgets into dev

/main
xingwei.zhu 5 年前
当前提交
fa97d4f2
共有 9 个文件被更改,包括 83 次插入27 次删除
  1. 3
      README-ZH.md
  2. 5
      README.md
  3. 14
      Runtime/cupertino/route.cs
  4. 3
      Runtime/material/bottom_navigation_bar.cs
  5. 7
      Runtime/rendering/sliver_multi_box_adaptor.cs
  6. 4
      Runtime/widgets/automatic_keep_alive.cs
  7. 2
      Runtime/widgets/routes.cs
  8. 24
      Runtime/widgets/sliver.cs
  9. 48
      Tests/Resources/Emoji.png.meta

3
README-ZH.md


## 使用要求
#### Unity
安装 Unity 2018.3 或更高版本。 你可以从[https://unity3d.com/get-unity/download](https://unity3d.com/get-unity/download)下载最新的Unity。
安装 **Unity 2018.4.10f1(LTS)****Unity 2019.1.14f1** 及其更高版本。 你可以从[https://unity3d.com/get-unity/download](https://unity3d.com/get-unity/download)下载最新的Unity。
#### UIWidgets包

5
README.md


The official website of Unity Chinese Documentation (https://connect.unity.com/doc) is powered by UIWidgets and
open-sourced @https://github.com/UnityTech/DocCN.
## Requirement
## Requirements
Install **Unity 2018.3** or above. You can download the latest Unity on https://unity3d.com/get-unity/download.
Install **Unity 2018.4.10f1 (LTS)** or **Unity 2019.1.14f1** and above. You can download the latest Unity on https://unity3d.com/get-unity/download.
#### UIWidgets Package
Visit our Github repository https://github.com/UnityTech/UIWidgets

14
Runtime/cupertino/route.cs


);
public static readonly DecorationTween _kGradientShadowTween = new DecorationTween(
begin: _CupertinoEdgeShadowDecoration.none,
end: new _CupertinoEdgeShadowDecoration(
edgeGradient: new LinearGradient(
begin: new Alignment(0.9f, 0.0f),

barrierDismissible: false,
barrierColor: _kModalBarrierColor,
transitionDuration: new TimeSpan(0, 0, 0, 0, 250),
pageBuilder: (BuildContext _context, Animation<float> animation, Animation<float> secondaryAnimation) => {
pageBuilder:
(BuildContext _context, Animation<float> animation, Animation<float> secondaryAnimation) => {
return builder(_context);
},
transitionBuilder: _buildCupertinoDialogTransitions

public readonly LinearGradient edgeGradient;
static _CupertinoEdgeShadowDecoration lerp(
static _CupertinoEdgeShadowDecoration lerpCupertino(
_CupertinoEdgeShadowDecoration a,
_CupertinoEdgeShadowDecoration b,
float t

public override Decoration lerpFrom(Decoration a, float t) {
if (!(a is _CupertinoEdgeShadowDecoration)) {
return lerp(null, this, t);
return lerpCupertino(null, this, t);
return lerp(a, this, t);
return lerpCupertino((_CupertinoEdgeShadowDecoration) a, this, t);
return lerp(this, null, t);
return lerpCupertino(this, null, t);
return lerp(this, b, t);
return lerpCupertino(this, (_CupertinoEdgeShadowDecoration) b, t);
}
public override BoxPainter createBoxPainter(VoidCallback onChanged = null) {

3
Runtime/material/bottom_navigation_bar.cs


child: text
);
}
else if (this.showUnselectedLabels) {
else if (!this.showUnselectedLabels) {
text = new FadeTransition(
opacity: this.animation,
child: text

Color backgroundColor = null;
switch (this.widget.type) {
case BottomNavigationBarType.fix:
backgroundColor = this.widget.backgroundColor;
break;
case BottomNavigationBarType.shifting:
backgroundColor = this._backgroundColor;

7
Runtime/rendering/sliver_multi_box_adaptor.cs


public bool keepAlive = false;
internal bool _keptAlive = false;
public bool keptAlive {
get { return this._keptAlive; }
}
internal bool _keptAlive = false;
public override string ToString() {
return $"index={this.index}; {(this.keepAlive ? "keeyAlive; " : "")}{base.ToString()}";
}

}
public override void insert(RenderBox child, RenderBox after = null) {
D.assert(!this._keepAliveBucket.ContainsValue(value: child));
base.insert(child, after: after);
D.assert(this.firstChild != null);
D.assert(() => {

4
Runtime/widgets/automatic_keep_alive.cs


}
else {
SchedulerBinding.instance.addPostFrameCallback(timeStamp => {
if (!this.mounted) {
return;
}
ParentDataElement childElement1 = this._getChildElement();
D.assert(childElement1 != null);
this._updateParentDataOfChild(childElement1);

}
ParentDataElement _getChildElement() {
D.assert(this.mounted);
Element element = (Element) this.context;
Element childElement = null;
element.visitChildren((Element child) => { childElement = child; });

2
Runtime/widgets/routes.cs


this._willPopCallbacks.Remove(callback);
}
protected internal bool hasScopedWillPopCallback {
public bool hasScopedWillPopCallback {
get { return this._willPopCallbacks.isNotEmpty(); }
}

24
Runtime/widgets/sliver.cs


this._currentBeforeChild = null;
D.assert(this._currentlyUpdatingChildIndex == null);
try {
int firstIndex = 0;
int lastIndex = 0;
if (!this._childElements.isEmpty()) {
firstIndex = this._childElements.First().Key;
lastIndex = this._childElements.Last().Key;
if (this._didUnderflow) {
lastIndex += 1;
}
}
for (int index = firstIndex; index <= lastIndex; ++index) {
void processElement(int index) {
this._currentBeforeChild = (RenderBox) newChild.renderObject;
var parentData = (SliverMultiBoxAdaptorParentData) newChild.renderObject.parentData;
if (!parentData.keptAlive) {
this._currentBeforeChild = (RenderBox) newChild.renderObject;
}
}
// processElement may modify the Map - need to do a .toList() here.
this._childElements.Keys.ToList().ForEach(action: processElement);
if (this._didUnderflow) {
var lastKey = this._childElements?.Last().Key ?? -1;
processElement(lastKey + 1);
}
}
finally {

48
Tests/Resources/Emoji.png.meta


wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0

platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: WebGL
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1

正在加载...
取消
保存