setting_view.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { _decorator, Component, Node } from 'cc';
  2. import UIDialog from '../Game/UIDialog';
  3. import { GameMng } from '../GameMng';
  4. import GBaseUI from '../gcommon/GBaseUI';
  5. import { UIButton } from '../gcommon/UIButton';
  6. import { UIManager } from '../gcommon/UIManager';
  7. const { ccclass, property } = _decorator;
  8. @ccclass('setting_view')
  9. export class setting_view extends GBaseUI {
  10. @property(Node)
  11. btn_close: Node = null;
  12. @property(Node)
  13. btn_chess_setting: Node = null;
  14. @property(Node)
  15. btn_music_setting: Node = null;
  16. @property(Node)
  17. btn_privacy: Node = null;
  18. @property(Node)
  19. btn_logout: Node = null;
  20. @property(Node)
  21. btn_about: Node = null;
  22. start() {
  23. UIButton.BindClick(this.btn_close,()=>{
  24. this.closeUI()
  25. },this)
  26. UIButton.BindClick(this.btn_chess_setting,()=>{
  27. UIManager.AddPrefab(GameMng.Instance.uiChessSettingView)
  28. },this)
  29. UIButton.BindClick(this.btn_music_setting,()=>{
  30. UIManager.AddPrefab(GameMng.Instance.music_setting_view)
  31. },this)
  32. UIButton.BindClick(this.btn_privacy,()=>{
  33. UIManager.AddPrefab(GameMng.Instance.privacy_setting_view)
  34. },this)
  35. UIButton.BindClick(this.btn_logout,()=>{
  36. UIDialog.Show(()=>{},()=>{},"游戏账号注销需要您退出当前账号,点击确定将退出并前往注销页面,您确定要退出吗?",null,true)
  37. },this)
  38. UIButton.BindClick(this.btn_about,()=>{
  39. UIManager.AddPrefab(GameMng.Instance.about_view)
  40. },this)
  41. }
  42. update(deltaTime: number) {
  43. }
  44. }