MCPcopy Create free account
hub / github.com/esengine/esengine / setErrorState

Method setErrorState

packages/fairygui/src/widgets/GLoader.ts:473–489  ·  view source on GitHub ↗

* Set error state and show error sign * 设置错误状态并显示错误标志

()

Source from the content-addressed store, hash-verified

471 * 设置错误状态并显示错误标志
472 */
473 private setErrorState(): void {
474 if (!this._showErrorSign) return;
475
476 if (!this._errorSign) {
477 const errorSignUrl = getUIConfig('loaderErrorSign');
478 if (errorSignUrl) {
479 this._errorSign = GLoader._errorSignPool.getObject(errorSignUrl);
480 }
481 }
482
483 if (this._errorSign) {
484 this._errorSign.setSize(this.width, this.height);
485 if (this._displayObject && this._errorSign.displayObject) {
486 this._displayObject.addChild(this._errorSign.displayObject);
487 }
488 }
489 }
490
491 /**
492 * Clear error state

Callers 2

loadFromPackageMethod · 0.95
onExternalLoadFailedMethod · 0.95

Calls 4

getUIConfigFunction · 0.90
getObjectMethod · 0.80
setSizeMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected