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