浏览代码

fix code style

/main
xingwei.zhu 6 年前
当前提交
afd16e9d
共有 2 个文件被更改,包括 5 次插入7 次删除
  1. 2
      Runtime/editor/scroll_input.cs
  2. 10
      Runtime/engine/WidgetCanvas.cs

2
Runtime/editor/scroll_input.cs


public ScrollInput(int? bufferSize = null, float? scrollScale = null) {
this._bufferSize = bufferSize ?? this._bufferSize;
this._scrollScale = scrollScale ?? this._scrollScale;
this._bufferIndex = this._bufferSize;
this._scrollDeltaX = 0;
this._scrollDeltaY = 0;

10
Runtime/engine/WidgetCanvas.cs


}
protected override Vector2 queryWindowSize() {
var rect = RectTransformUtility.PixelAdjustRect(this._widgetCanvas.rectTransform,
var rect = RectTransformUtility.PixelAdjustRect(this._widgetCanvas.rectTransform,
this._widgetCanvas.canvas);
var size = new Vector2(rect.width, rect.height) / this._widgetCanvas.devicePixelRatio;
size.x = Mathf.Round(size.x);

readonly ScrollInput _scrollInput = new ScrollInput();
DisplayMetrics _displayMetrics;
Input.simulateMouseWithTouches = false;
if (_repaintEvent == null) {
_repaintEvent = new Event {type = EventType.Repaint};

this.texture = texture;
this.material = mat;
}
void Update() {
this._displayMetrics.Update();
if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject != this.gameObject) {

physicalY: pos.y
));
}
void handleMouseScroll() {
if (Input.mouseScrollDelta.y != 0 || Input.mouseScrollDelta.x != 0) {
var scaleFactor = this.canvas.scaleFactor;

正在加载...
取消
保存