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

Method handleTouchBegin

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

Source from the content-addressed store, hash-verified

599 }
600
601 private handleTouchBegin(): void {
602 this._down = true;
603
604 if (this._mode === EButtonMode.Common) {
605 if (
606 this.grayed &&
607 this._buttonController &&
608 this._buttonController.hasPage(GButton.DISABLED)
609 ) {
610 this.setState(GButton.SELECTED_DISABLED);
611 } else {
612 this.setState(GButton.DOWN);
613 }
614 }
615
616 // Listen for touch end globally
617 this.root?.on(FGUIEvents.TOUCH_END, this.handleTouchEnd, this);
618 }
619
620 private handleTouchEnd(): void {
621 if (this._down) {

Callers

nothing calls this directly

Calls 3

setStateMethod · 0.95
hasPageMethod · 0.80
onMethod · 0.45

Tested by

no test coverage detected