浏览代码

add recreateWidget.

/main
kg 6 年前
当前提交
3f331ca4
共有 2 个文件被更改,包括 15 次插入5 次删除
  1. 9
      Runtime/engine/UIWidgetsPanel.cs
  2. 11
      Runtime/ui/painting/canvas_impl.cs

9
Runtime/engine/UIWidgetsPanel.cs


protected virtual Widget createWidget() {
return null;
}
public void recreateWidget() {
Widget root;
using (this._windowAdapter.getScope()) {
root = this.createWidget();
}
this._windowAdapter.attachRootWidget(root);
}
internal void applyRenderTexture(Rect screenRect, Texture texture, Material mat) {
this.texture = texture;

11
Runtime/ui/painting/canvas_impl.cs


D.assert(this._layers[0].states.Count == 1);
var layer = this._currentLayer;
if (layer.draws.Count == 0) {
D.assert(layer.layers.Count == 0);
return;
}
using (var cmdBuf = new CommandBuffer()) {
cmdBuf.name = "CommandBufferCanvas";

break;
}
}
if (toClear) {
this._setRenderTarget(cmdBuf, layer.rtID, ref toClear);
}
D.assert(!toClear);
foreach (var subLayer in layer.layers) {
cmdBuf.ReleaseTemporaryRT(subLayer.rtID);

正在加载...
取消
保存