| 123456789101112131415161718192021222324252627282930313233 |
- 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<void> {
- addBtnClick(this.btnClose, this.onBtnCloseClick, this);
- addBtnClick(this.btnPlay, this.onBtnPlayClick, this);
- }
- private async onBtnCloseClick() {
- await AppKernel.appLobby.onLoginSuccess();
- AppKernel.ui.close(UIViewID.AutoLogin);
- }
- private onBtnPlayClick() {
- this.onBtnCloseClick();
- }
- }
|