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

Method showTooltipsWin

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

* Show custom tooltip window * 显示自定义提示窗口

(tooltipWin: GObject, position?: { x: number; y: number })

Source from the content-addressed store, hash-verified

229 * 显示自定义提示窗口
230 */
231 public showTooltipsWin(tooltipWin: GObject, position?: { x: number; y: number }): void {
232 this._tooltipWin = tooltipWin;
233 this.addChild(tooltipWin);
234
235 if (position) {
236 tooltipWin.setXY(position.x, position.y);
237 } else {
238 const stage = Stage.inst;
239 tooltipWin.setXY(stage.mouseX + 10, stage.mouseY + 20);
240 }
241 }
242
243 /**
244 * Hide tooltip

Callers 1

showTooltipsMethod · 0.95

Calls 2

setXYMethod · 0.80
addChildMethod · 0.45

Tested by

no test coverage detected