浏览代码

Merge branch 'master' of github.com:Unity-Technologies/com.unity.uiwidgets into siyaoH/1.17/stream

/main
Xingwei Zhu 3 年前
当前提交
858284c6
共有 17 个文件被更改,包括 33 次插入33 次删除
  1. 2
      README-ZH.md
  2. 2
      README.md
  3. 1
      com.unity.uiwidgets/Editor/UIWidgetsPanelEditor.cs
  4. 2
      com.unity.uiwidgets/Runtime/cupertino/route.cs
  5. 12
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs
  6. 12
      com.unity.uiwidgets/Runtime/foundation/assertions.cs
  7. 1
      com.unity.uiwidgets/Runtime/material/slider.cs
  8. 1
      com.unity.uiwidgets/Runtime/material/tooltip.cs
  9. 8
      com.unity.uiwidgets/Runtime/rendering/paragraph.cs
  10. 1
      com.unity.uiwidgets/Runtime/scheduler/binding.cs
  11. 8
      com.unity.uiwidgets/Runtime/ui/text.cs
  12. 2
      com.unity.uiwidgets/Runtime/widgets/actions.cs
  13. 10
      com.unity.uiwidgets/Runtime/widgets/framework.cs
  14. 2
      com.unity.uiwidgets/Runtime/widgets/inherited_notifier.cs
  15. 2
      com.unity.uiwidgets/Runtime/widgets/widget_span.cs

2
README-ZH.md


namespace UIWidgetsSample
{
public class CountDemo : UIWidgetsPanel
public class UIWidgetsExample : UIWidgetsPanel
{
protected void OnEnable()
{

2
README.md


namespace UIWidgetsSample
{
public class CountDemo : UIWidgetsPanel
public class UIWidgetsExample : UIWidgetsPanel
{
protected void OnEnable()
{

1
com.unity.uiwidgets/Editor/UIWidgetsPanelEditor.cs


public override void OnInspectorGUI() {
base.OnInspectorGUI();
EditorGUILayout.PropertyField(serializedObject.FindProperty("fonts"), true);
EditorGUILayout.PropertyField(serializedObject.FindProperty("devicePixelRatioEditorOnlyOverride"), new GUIContent(text: "[EditorOnly]DPR Override"), false);
EditorGUI.BeginChangeCheck();
UIWidgetsPanel panel = (UIWidgetsPanel)target;
serializedObject.ApplyModifiedProperties();

2
com.unity.uiwidgets/Runtime/cupertino/route.cs


}
public string barrierLabel {
public override string barrierLabel {
get { return null; }
}

12
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs


panels.Remove(panel);
}
float _devicePixelRatioOverride;
public bool hardwareAntiAliasing;
public float devicePixelRatioEditorOnlyOverride;
public TextFont[] fonts;
Configurations _configurations;

#if !UNITY_EDITOR
return _wrapper.displayMetrics.DevicePixelRatioByDefault;
#endif
if (devicePixelRatioEditorOnlyOverride > 0) {
return devicePixelRatioEditorOnlyOverride;
}
var currentDpi = Screen.dpi;
if (currentDpi == 0) {
currentDpi = canvas.GetComponent<CanvasScaler>().fallbackScreenDPI;

}
protected void OnEnable() {
protected override void OnEnable() {
if (UIWidgetsDisabled) {
enabled = false;
return;

12
com.unity.uiwidgets/Runtime/foundation/assertions.cs


public delegate IEnumerable<DiagnosticsNode> DiagnosticPropertiesTransformer(IEnumerable<DiagnosticsNode> properties);
public delegate IEnumerable<DiagnosticsNode> InformationCollector();
internal abstract class _ErrorDiagnostic : DiagnosticsProperty<List<object>> {
public abstract class _ErrorDiagnostic : DiagnosticsProperty<List<object>> {
internal _ErrorDiagnostic(
string message,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.flat,

return string.Join("", value);
}
}
internal class ErrorDescription : _ErrorDiagnostic {
public class ErrorDescription : _ErrorDiagnostic {
public ErrorDescription(string message) : base(message, level: DiagnosticLevel.info) {
}

internal class ErrorSummary : _ErrorDiagnostic {
public class ErrorSummary : _ErrorDiagnostic {
public ErrorSummary(string message) : base(message, level: DiagnosticLevel.summary) {
}

1
com.unity.uiwidgets/Runtime/material/slider.cs


using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async;
using Unity.UIWidgets.async;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

1
com.unity.uiwidgets/Runtime/material/tooltip.cs


using uiwidgets;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.async;
using Unity.UIWidgets.async;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;
using Unity.UIWidgets.painting;

8
com.unity.uiwidgets/Runtime/rendering/paragraph.cs


void _computeChildrenWidthWithMaxIntrinsics(float height) {
RenderBox child = firstChild;
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(childCount);
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(new PlaceholderDimensions[childCount]);
int childIndex = 0;
while (child != null) {
placeholderDimensions[childIndex] = new PlaceholderDimensions(

void _computeChildrenWidthWithMinIntrinsics(float height) {
RenderBox child = firstChild;
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(childCount);
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(new PlaceholderDimensions[childCount]);
int childIndex = 0;
while (child != null) {
float intrinsicWidth = child.getMinIntrinsicWidth(height);

void _computeChildrenHeightWithMinIntrinsics(float width) {
RenderBox child = firstChild;
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(childCount);
List<PlaceholderDimensions> placeholderDimensions = new List<PlaceholderDimensions>(new PlaceholderDimensions[childCount]);
int childIndex = 0;
while (child != null) {
float intrinsicHeight = child.getMinIntrinsicHeight(width);

return;
}
RenderBox child = firstChild;
_placeholderDimensions = new List<PlaceholderDimensions>(childCount);
_placeholderDimensions = new List<PlaceholderDimensions>(new PlaceholderDimensions[childCount]);
int childIndex = 0;
while (child != null) {
child.layout(

1
com.unity.uiwidgets/Runtime/scheduler/binding.cs


using System.Text;
using developer;
using Unity.UIWidgets.async;
using Unity.UIWidgets.async;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;

8
com.unity.uiwidgets/Runtime/ui/text.cs


}
public void addPlaceholder(float width, float height, PlaceholderAlignment alignment,
TextBaseline baseline,
TextBaseline? baseline,
D.assert(alignment == PlaceholderAlignment.aboveBaseline ||
D.assert((alignment == PlaceholderAlignment.aboveBaseline ||
alignment == PlaceholderAlignment.baseline);
alignment == PlaceholderAlignment.baseline) ? baseline != null : true);
(int) baseline);
(int) (baseline ?? TextBaseline.alphabetic));
placeholderCount++;
placeholderScales.Add(item: scale);
}

2
com.unity.uiwidgets/Runtime/widgets/actions.cs


public class CallbackAction : UiWidgetAction {
public CallbackAction(LocalKey intentKey, OnInvokeCallback onInvoke) : base(intentKey: intentKey) {
public CallbackAction(LocalKey intentKey = null, OnInvokeCallback onInvoke = null) : base(intentKey: intentKey) {
D.assert(onInvoke != null);
this.onInvoke = onInvoke;
}

10
com.unity.uiwidgets/Runtime/widgets/framework.cs


get { return _debugStateLockLevel > 0; }
}
internal bool debugBuilding {
public bool debugBuilding {
get { return _debugBuilding; }
}
bool _debugBuilding = false;

notifyClients(oldWidget);
}
protected abstract void notifyClients(ProxyWidget oldWidget);
public abstract void notifyClients(ProxyWidget oldWidget);
}
public class ParentDataElement : ProxyElement {

_applyParentData(newWidget);
}
protected override void notifyClients(ProxyWidget oldWidget) {
public override void notifyClients(ProxyWidget oldWidget) {
_applyParentData((ParentDataWidget) widget);
}
}

_applyParentData(newWidget);
}
protected override void notifyClients(ProxyWidget oldWidget) {
public override void notifyClients(ProxyWidget oldWidget) {
_applyParentData((ParentDataWidget<T>) widget);
}

}
}
protected override void notifyClients(ProxyWidget oldWidgetRaw) {
public override void notifyClients(ProxyWidget oldWidgetRaw) {
var oldWidget = (InheritedWidget) oldWidgetRaw;
D.assert(_debugCheckOwnerBuildTargetExists("notifyClients"));

2
com.unity.uiwidgets/Runtime/widgets/inherited_notifier.cs


markNeedsBuild();
}
protected override void notifyClients(ProxyWidget oldWidget) {
public override void notifyClients(ProxyWidget oldWidget) {
oldWidget = (InheritedNotifier<T>) oldWidget;
base.notifyClients(oldWidget);
_dirty = false;

2
com.unity.uiwidgets/Runtime/widgets/widget_span.cs


public override RenderComparison compareTo(InlineSpan other) {
if (this == other)
return RenderComparison.identical;
if (style.GetType() != GetType())
if (other.GetType() != GetType())
return RenderComparison.layout;
if ((style == null) != (other.style == null))
return RenderComparison.layout;

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存