| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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('RegisterSuccessView')
- export class RegisterSuccessView extends UIView {
- readonly viewId = UIViewID.RegisterSuccessView;
- @property(Node)
- private btnClose: Node = null;
- @property(Node)
- private btnPlay: Node = null;
- protected onCreate(): void | Promise<void> {
- 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<void> {
- }
- protected onClose(_reason: UICloseReason): void | Promise<void> {
- }
- protected onDestroy(): void {
- }
- }
|