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

Method bringToFront

packages/fairygui/src/core/GRoot.ts:348–361  ·  view source on GitHub ↗

* Bring window to front * 将窗口置于最前

(win: GObject)

Source from the content-addressed store, hash-verified

346 * 将窗口置于最前
347 */
348 public bringToFront(win: GObject): void {
349 const cnt = this.numChildren;
350 let i: number;
351 if (this._modalLayer && this._modalLayer.parent === this) {
352 i = this.getChildIndex(this._modalLayer);
353 } else {
354 i = cnt - 1;
355 }
356
357 const index = this.getChildIndex(win);
358 if (index < i) {
359 this.setChildIndex(win, i);
360 }
361 }
362
363 /**
364 * Get top window

Callers

nothing calls this directly

Calls 2

getChildIndexMethod · 0.80
setChildIndexMethod · 0.80

Tested by

no test coverage detected