(target: GObject)
| 218 | } |
| 219 | |
| 220 | public replaceMe(target: GObject): void { |
| 221 | if (!this._parent) { |
| 222 | throw new Error('parent not set'); |
| 223 | } |
| 224 | |
| 225 | target.name = this.name; |
| 226 | target.alpha = this.alpha; |
| 227 | target.rotation = this.rotation; |
| 228 | target.visible = this.visible; |
| 229 | target.touchable = this.touchable; |
| 230 | target.grayed = this.grayed; |
| 231 | target.setXY(this.x, this.y); |
| 232 | target.setSize(this.width, this.height); |
| 233 | |
| 234 | const index = this._parent.getChildIndex(this); |
| 235 | this._parent.addChildAt(target, index); |
| 236 | target.relations.copyFrom(this.relations); |
| 237 | |
| 238 | this._parent.removeChild(this, true); |
| 239 | } |
| 240 | |
| 241 | public addBeforeMe(target: GObject): void { |
| 242 | if (!this._parent) { |
nothing calls this directly
no test coverage detected