123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import { _decorator, Component, Node, Toggle } from 'cc';
- import GBaseUI from '../gcommon/GBaseUI';
- import { UIButton } from '../gcommon/UIButton';
- import { page_btn } from './page_btn';
- const { ccclass, property } = _decorator;
- @ccclass('music_setting_view')
- export class music_setting_view extends GBaseUI {
- @property(Node)
- btn_close: Node = null;
- @property(Node)
- btn_bg_music: Node = null;
- @property(Node)
- btn_chess_music: Node = null;
- start() {
- UIButton.BindClick(this.btn_close,()=>{
- this.closeUI()
- },this)
- UIButton.BindClick(this.btn_bg_music,()=>{
- this.clickToggle(this.btn_bg_music)
- },this)
- UIButton.BindClick(this.btn_chess_music,()=>{
- this.clickToggle(this.btn_chess_music)
- },this)
-
- }
- clickToggle(node:Node){
- if(node.getComponent(page_btn).isSelect()){
- node.getComponent(page_btn).status_unselect()
- }else{
- node.getComponent(page_btn).status_select()
- }
-
- }
- update(deltaTime: number) {
-
- }
- }
|