()
| 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) { |