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

Method handleTouchEnd

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

Source from the content-addressed store, hash-verified

618 }
619
620 private handleTouchEnd(): void {
621 if (this._down) {
622 this.root?.off(FGUIEvents.TOUCH_END, this.handleTouchEnd, this);
623 this._down = false;
624
625 if (!this._displayObject) {
626 return;
627 }
628
629 if (this._mode === EButtonMode.Common) {
630 if (
631 this.grayed &&
632 this._buttonController &&
633 this._buttonController.hasPage(GButton.DISABLED)
634 ) {
635 this.setState(GButton.DISABLED);
636 } else if (this._over) {
637 this.setState(GButton.OVER);
638 } else {
639 this.setState(GButton.UP);
640 }
641 }
642 }
643 }
644
645 private handleClick(): void {
646 if (this._mode === EButtonMode.Check) {

Callers

nothing calls this directly

Calls 3

setStateMethod · 0.95
hasPageMethod · 0.80
offMethod · 0.45

Tested by

no test coverage detected