|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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; |
|
|
|