import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc'; import { UIView } from '@scripts/framework/ui/UIView'; 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'; const { ccclass, property } = _decorator; @ccclass('AutoLoginView') export class AutoLoginView extends UIView { readonly viewId = UIViewID.AutoLoginView; @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.ResetPsdView); const loginView = AppKernel.ui.get(UIViewID.LoginView) as any; if (loginView && loginView?.enabled) { loginView?._googleWebBtn?.setActive(true); } } private onBtnPlayClick() { this.onBtnCloseClick() } protected onOpen(_params: unknown): void | Promise { } protected onClose(_reason: UICloseReason): void | Promise { } protected onDestroy(): void { } }