浏览代码

fix

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
3f831a6f
共有 3 个文件被更改,包括 15 次插入9 次删除
  1. 6
      com.unity.uiwidgets/Runtime/rendering/texture.cs
  2. 12
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  3. 6
      com.unity.uiwidgets/Runtime/widgets/texture.cs

6
com.unity.uiwidgets/Runtime/rendering/texture.cs


_textureId = textureId;
}
public int textureId {
public int? textureId {
get { return _textureId; }
set {
D.assert(value != null);

}
}
int _textureId;
int? _textureId;
protected override bool sizedByParent {
get { return true; }

context.addLayer(new TextureLayer(
rect: Rect.fromLTWH(offset.dx, offset.dy, size.width, size.height),
textureId: _textureId
textureId: _textureId.Value
));
}
}

12
com.unity.uiwidgets/Runtime/widgets/basic.cs


ImageRepeat repeat = ImageRepeat.noRepeat,
Rect centerSlice = null,
bool invertColors = false,
FilterMode filterMode = FilterMode.Bilinear
FilterMode filterMode = FilterMode.Bilinear ,
FilterQuality filterQuality = FilterQuality.low
) : base(key) {
this.image = image;
this.width = width;

this.centerSlice = centerSlice;
this.invertColors = invertColors;
this.filterMode = filterMode;
this.filterQuality = filterQuality;
}
public readonly ui.Image image;

public readonly ImageRepeat repeat;
public readonly Rect centerSlice;
public readonly bool invertColors;
public readonly FilterQuality filterQuality;
public override RenderObject createRenderObject(BuildContext context) {
return new RenderImage(

alignment: alignment,
repeat: repeat,
centerSlice: centerSlice,
invertColors: invertColors
// filterMode: filterMode
invertColors: invertColors,
filterQuality: filterQuality
);
}

renderImage.repeat = repeat;
renderImage.centerSlice = centerSlice;
renderImage.invertColors = invertColors;
// renderImage.filterMode = filterMode;
renderImage.filterQuality = filterQuality;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {

6
com.unity.uiwidgets/Runtime/widgets/texture.cs


// }
// }
public Texture(int textureId, Key key = null) : base(key: key) {
public Texture( Key key = null, int? textureId = null) : base(key: key) {
this.textureId = textureId;
if (textureId != null) {
this.textureId = textureId.Value;
}
}
public readonly int textureId;

正在加载...
取消
保存