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

Method handleClick

packages/fairygui/src/widgets/GButton.ts:645–661  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

643 }
644
645 private handleClick(): void {
646 if (this._mode === EButtonMode.Check) {
647 if (this._changeStateOnClick) {
648 this.selected = !this._selected;
649 this.emit(FGUIEvents.STATE_CHANGED);
650 }
651 } else if (this._mode === EButtonMode.Radio) {
652 if (this._changeStateOnClick && !this._selected) {
653 this.selected = true;
654 this.emit(FGUIEvents.STATE_CHANGED);
655 }
656 } else {
657 if (this._relatedController) {
658 this._relatedController.selectedPageId = this._relatedPageId;
659 }
660 }
661 }
662}

Callers 1

fireClickMethod · 0.95

Calls 1

emitMethod · 0.45

Tested by

no test coverage detected