浏览代码

fix dismiss.

/main
kg 6 年前
当前提交
f76588f7
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1
      Runtime/engine/UIWidgetsPanel.cs
  2. 4
      Runtime/widgets/dismissible.cs

1
Runtime/engine/UIWidgetsPanel.cs


using UnityEngine.UI;
using RawImage = UnityEngine.UI.RawImage;
using Rect = UnityEngine.Rect;
using Texture = UnityEngine.Texture;
namespace Unity.UIWidgets.engine {
public class UIWidgetWindowAdapter : WindowAdapter {

4
Runtime/widgets/dismissible.cs


case _FlingGestureKind.forward:
D.assert(this._dragExtent != 0.0f);
D.assert(!this._moveController.isDismissed);
if ((this.widget.dismissThresholds[this._dismissDirection] ?? _kDismissThreshold) >= 1.0) {
if ((this.widget.dismissThresholds.getOrDefault(this._dismissDirection) ?? _kDismissThreshold) >= 1.0) {
this._moveController.reverse();
break;
}

if (!this._moveController.isDismissed) {
// we already know it's not completed, we check that above
if (this._moveController.value >
(this.widget.dismissThresholds[this._dismissDirection] ?? _kDismissThreshold)) {
(this.widget.dismissThresholds.getOrDefault(this._dismissDirection) ?? _kDismissThreshold)) {
this._moveController.forward();
}
else {

正在加载...
取消
保存