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

Method fireClick

packages/fairygui/src/widgets/GButton.ts:335–342  ·  view source on GitHub ↗

* Fire a click event programmatically * 程序化触发点击事件

(bDownEffect: boolean = true)

Source from the content-addressed store, hash-verified

333 * 程序化触发点击事件
334 */
335 public fireClick(bDownEffect: boolean = true): void {
336 if (bDownEffect && this._mode === EButtonMode.Common) {
337 this.setState(GButton.OVER);
338 setTimeout(() => this.setState(GButton.DOWN), 100);
339 setTimeout(() => this.setState(GButton.UP), 200);
340 }
341 this.handleClick();
342 }
343
344 /**
345 * Set button state

Callers

nothing calls this directly

Calls 2

setStateMethod · 0.95
handleClickMethod · 0.95

Tested by

no test coverage detected