* Show custom tooltip window * 显示自定义提示窗口
(tooltipWin: GObject, position?: { x: number; y: number })
| 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 |
no test coverage detected