import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc'; import { UIViewID } from '@scripts/define/UIDefine'; import { UICloseReason } from '@scripts/framework/ui/UILayer'; import { addBtnClick } from '@scripts/utils/UIHelper'; import { AppKernel } from '@scripts/app/AppKernel'; import { UIPopup } from '@scripts/framework/ui/UIPopup'; const { ccclass, property } = _decorator; @ccclass('AutoLogin') export class AutoLogin extends UIPopup { readonly viewId = UIViewID.AutoLogin; @property(Node) private btnClose: Node = null; @property(Node) private btnPlay: Node = null; protected onCreate(): void | Promise { addBtnClick(this.btnClose, this.onBtnCloseClick, this); addBtnClick(this.btnPlay, this.onBtnPlayClick, this); } private onBtnCloseClick() { AppKernel.ui.close(UIViewID.ResetPsd); const loginView = AppKernel.ui.get(UIViewID.LoginView) as any; if (loginView && loginView?.enabled) { loginView?._googleWebBtn?.setActive(true); } } private onBtnPlayClick() { this.onBtnCloseClick() } }