override protected void CreateDisplayObject() { _container = new Container(); _container.gOwner = this; _container.hitArea = new Rect(); _container.SetScale(GRoot.contentScaleFactor, GRoot.contentScaleFactor); displayObject = _container; _image = new Image(); _container.AddChild(_image); }
override protected void HandleSizeChanged() { if (!_updatingLayout) { UpdateLayout(); } if (_container.hitArea != null) { _container.hitArea = new Rect(0, 0, this.width, this.height); } _container.SetScale(this.scaleX * GRoot.contentScaleFactor, this.scaleY * GRoot.contentScaleFactor); }
override protected void HandleSizeChanged() { if (!_updatingLayout) { UpdateLayout(); } if (_container.hitArea != null) { ((RectHitTest)_container.hitArea).Set(0, 0, this.width, this.height); } _container.SetScale(this.scaleX, this.scaleY); }
protected override void CreateDisplayObject() { _container = new Container(); _container.gOwner = this; _container.hitArea = new Rect(); _container.SetScale(GRoot.contentScaleFactor, GRoot.contentScaleFactor); displayObject = _container; _image = new Image(); _container.AddChild(_image); }