您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
21 行
706 B
21 行
706 B
using Unity.UIWidgets.foundation;
|
|
using Unity.UIWidgets.rendering;
|
|
|
|
namespace Unity.UIWidgets.widgets {
|
|
public class Texture : LeafRenderObjectWidget {
|
|
public Texture(Key key, UnityEngine.Texture texture) : base(key: key) {
|
|
D.assert(texture != null);
|
|
this.texture = texture;
|
|
}
|
|
|
|
public readonly UnityEngine.Texture texture;
|
|
|
|
public override RenderObject createRenderObject(BuildContext context) {
|
|
return new TextureBox(texture: this.texture);
|
|
}
|
|
|
|
public override void updateRenderObject(BuildContext context, RenderObject renderObject) {
|
|
((TextureBox) renderObject).texture = this.texture;
|
|
}
|
|
}
|
|
}
|