消消方块阵换皮表情
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

1 week ago
//*********************
// create by 流云
// time: Fri Jun 13 2025
// desc:
//*********************
import { _decorator, Component, Node, find } from 'cc';
import { Auto_MsgBox } from './Auto_MsgBox';
const { ccclass, property } = _decorator;
@ccclass('UIMsgBox')
export class UIMsgBox extends Auto_MsgBox {
onLoad(): void {
super.onLoad();
}
onEnable(): void {
super.onEnable();
}
onDisable(): void {
super.onDisable();
}
onInit(): void {
if (this.prema["title"]) this.title = this.prema["title"];
if (this.prema["content"]) this.content = this.prema["content"];
if (this.prema["yesFun"]) this.yesFun = this.prema["yesFun"];
if (this.prema["noFun"]) this.noFun = this.prema["noFun"];
this.lb_content.string = this.content;
this.showOpenCenterEff();
this.showOpenMaskEff(2);
this.btnOk.x = this.noFun ? -110 : 0;
this.btnNo.active = this.noFun != null;
}
title: string = "";
content: string = "";
yesFun: Function = null;
noFun: Function = null;
click_btnNo(): void {
this.close(2);
if (this.noFun) this.noFun();
}
click_btnOk(): void {
this.close(2);
if (this.yesFun) this.yesFun();
}
}