import { _decorator, Component, Node } from 'cc'; import UIDialog from '../Game/UIDialog'; import { GameMng } from '../GameMng'; import GBaseUI from '../gcommon/GBaseUI'; import { UIButton } from '../gcommon/UIButton'; import { UIManager } from '../gcommon/UIManager'; const { ccclass, property } = _decorator; @ccclass('setting_view') export class setting_view extends GBaseUI { @property(Node) btn_close: Node = null; @property(Node) btn_chess_setting: Node = null; @property(Node) btn_music_setting: Node = null; @property(Node) btn_privacy: Node = null; @property(Node) btn_logout: Node = null; @property(Node) btn_about: Node = null; start() { UIButton.BindClick(this.btn_close,()=>{ this.closeUI() },this) UIButton.BindClick(this.btn_chess_setting,()=>{ UIManager.AddPrefab(GameMng.Instance.uiChessSettingView) },this) UIButton.BindClick(this.btn_music_setting,()=>{ UIManager.AddPrefab(GameMng.Instance.music_setting_view) },this) UIButton.BindClick(this.btn_privacy,()=>{ UIManager.AddPrefab(GameMng.Instance.privacy_setting_view) },this) UIButton.BindClick(this.btn_logout,()=>{ UIDialog.Show(()=>{},()=>{},"游戏账号注销需要您退出当前账号,点击确定将退出并前往注销页面,您确定要退出吗?",null,true) },this) UIButton.BindClick(this.btn_about,()=>{ UIManager.AddPrefab(GameMng.Instance.about_view) },this) } update(deltaTime: number) { } }