diff --git a/source/src/fairygui/GLoader.ts b/source/src/fairygui/GLoader.ts index 0017c6a..85adf0d 100644 --- a/source/src/fairygui/GLoader.ts +++ b/source/src/fairygui/GLoader.ts @@ -306,6 +306,8 @@ namespace fgui { } private __getResCompleted(tex: Laya.Texture): void { + if(this.isDisposed) + return; if (tex != null) this.onExternalLoadSuccess(tex); else diff --git a/source/src/fairygui/GLoader3D.ts b/source/src/fairygui/GLoader3D.ts index 3eab306..1bf5656 100644 --- a/source/src/fairygui/GLoader3D.ts +++ b/source/src/fairygui/GLoader3D.ts @@ -244,6 +244,8 @@ namespace fgui { this.url = null; this._content = skeleton; + this._content.on(Laya.Event.LABEL, this, this._playLabel); + this._content.on(Laya.Event.STOPPED, this, this._playComplete); this._container.addChild(this._content); this._content.pos(anchor.x, anchor.y); ToolSet.setColorFilter(this._content, this._color); @@ -253,6 +255,15 @@ namespace fgui { this.updateLayout(); } + private _playComplete() { + fgui.Events.dispatch(Laya.Event.STOPPED, this.displayObject); + } + + private _playLabel(evt_data: Laya.EventData) { + let event = fgui.Events.createEvent(Laya.Event.LABEL, this.displayObject); + this.displayObject.event(Laya.Event.LABEL, [evt_data, event]); + } + private onChange(): void { if (!this._content) return; diff --git a/source/src/fairygui/GTextInput.ts b/source/src/fairygui/GTextInput.ts index 0abb10c..9142b57 100644 --- a/source/src/fairygui/GTextInput.ts +++ b/source/src/fairygui/GTextInput.ts @@ -102,6 +102,8 @@ namespace fgui { } if (buffer.readBool()) this.password = true; + + this._displayObject.multiline = !this.singleLine; } } } \ No newline at end of file