浏览代码

merge

/main
kg 6 年前
当前提交
1d3be554
共有 7 个文件被更改,包括 27 次插入21 次删除
  1. 13
      Assets/UIWidgets/Tests/Gestures.cs
  2. 2
      Assets/UIWidgets/debugger/inspector_service.cs
  3. 12
      Assets/UIWidgets/editor/editor_window.cs
  4. 2
      Assets/UIWidgets/painting/decoration_image.cs
  5. 3
      Assets/UIWidgets/ui/compositing.cs
  6. 4
      Assets/UIWidgets/widgets/basic.cs
  7. 12
      Assets/UIWidgets/widgets/widget_inspector.cs

13
Assets/UIWidgets/Tests/Gestures.cs


}
}
if (this.windowAdapter != null) {
this.windowAdapter.OnGUI();
}
this.windowAdapter.OnGUI();
if (this.windowAdapter != null) {
this.windowAdapter.Update();
}
this.windowAdapter.Update();
this.windowAdapter.OnEnable();
this._tapRecognizer = new TapGestureRecognizer();
this._tapRecognizer.onTap = () => { Debug.Log("tap"); };

this._doubleTapGesture.onDoubleTap = () => { Debug.Log("onDoubleTap"); };
}
void OnDestroy() {
this.windowAdapter.Destory();
void OnDisable() {
this.windowAdapter.OnDisable();
this.windowAdapter = null;
}

2
Assets/UIWidgets/debugger/inspector_service.cs


public class InspectorService
{
public readonly WindowAdapter window;
public readonly WindowAdapter window;
public SelectionChanged selectionChanged;

12
Assets/UIWidgets/editor/editor_window.cs


}
}
public void WithBinding(Action fn) {
using (this.getScope()) {
fn();
}
}
public T WithBindingFunc<T>(Func<T> fn) {
using (this.getScope()) {
return fn();
}
}
public void OnGUI() {
using (this.getScope()) {
bool dirty = false;

2
Assets/UIWidgets/painting/decoration_image.cs


fittedSizes.source, Offset.zero & inputSize
);
foreach (Rect tileRect in _generateImageTileRects(rect, destinationRect, repeat)) {
//canvas.drawImageRect(image, tileRect, sourceRect, paint);
canvas.drawImageRect(image.texture, sourceRect, tileRect, paint);
}
}
else {

3
Assets/UIWidgets/ui/compositing.cs


public class Scene : IDisposable {
public Scene(Layer rootLayer) {
this._rootLayer = rootLayer;
readonly Layer _rootLayer;
readonly LayerTree _layerTree;

4
Assets/UIWidgets/widgets/basic.cs


public readonly PointerHoverEventListener onPointerHover;
public readonly PointerEnterEventListener onPointerEnter;
public readonly PointerEnterEventListener onPointerEnter;
public readonly PointerLeaveEventListener onPointerLeave;
public readonly PointerLeaveEventListener onPointerLeave;
public readonly HitTestBehavior behavior;

12
Assets/UIWidgets/widgets/widget_inspector.cs


Size size = state.overlayRect.size;
var fillPaint = new Paint(){color = _kHighlightedRenderObjectFillColor};
var borderPaint = new Paint(){color = _kHighlightedRenderObjectBorderColor};
var borderPaint = new Paint(){color = _kHighlightedRenderObjectBorderColor, style = PaintingStyle.stroke, strokeWidth = 1};
canvas.setMatrix(state.selected.transform);
canvas.drawRect(selectedPaintRect, null, null, fillPaint);
canvas.drawRect(selectedPaintRect, BorderWidth.all(1), null, borderPaint);
canvas.setMatrix(state.selected.transform.toMatrix3());
canvas.drawRect(selectedPaintRect, fillPaint);
canvas.drawRect(selectedPaintRect, borderPaint);
canvas.setMatrix(transformedRect.transform);
canvas.drawRect(transformedRect.rect.deflate(0.5), BorderWidth.all(1), null, borderPaint);
canvas.setMatrix(transformedRect.transform.toMatrix3());
canvas.drawRect(transformedRect.rect.deflate(0.5), borderPaint);
canvas.restore();
}

正在加载...
取消
保存