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.
47 lines
1.4 KiB
47 lines
1.4 KiB
|
|
//*********************
|
|
// create by 流云
|
|
// time: Tue Jan 13 2026
|
|
// desc:
|
|
//*********************
|
|
import { _decorator, Node, RichText } from 'cc';
|
|
import { Auto_PopNotice } from './Auto_PopNotice';
|
|
import { ConstNumType } from '../../game/GameDataEnums';
|
|
import { sdkConfig } from '../../sdk/sdkConfig';
|
|
const { ccclass } = _decorator;
|
|
|
|
@ccclass('UIPopNotice')
|
|
export class UIPopNotice extends Auto_PopNotice {
|
|
|
|
onLoad(): void {
|
|
super.onLoad();
|
|
}
|
|
|
|
onEnable(): void {
|
|
super.onEnable();
|
|
this.ui_bgMask.on(Node.EventType.TOUCH_END, this.onClickClose, this);
|
|
this.btnClose.on(Node.EventType.TOUCH_END, this.onClickClose, this);
|
|
}
|
|
|
|
onDisable(): void {
|
|
super.onDisable();
|
|
this.ui_bgMask.off(Node.EventType.TOUCH_END, this.onClickClose, this);
|
|
this.btnClose.off(Node.EventType.TOUCH_END, this.onClickClose, this);
|
|
}
|
|
|
|
onInit(): void {
|
|
this.lb_title.string = sdkConfig.config.vsion + "版本更新公告";
|
|
const content = gg.data.table.getConstString(ConstNumType.VersionNotice);
|
|
if (!content) {
|
|
console.warn('[UIPopNotice] Const 29 para1 为空');
|
|
}
|
|
const richText = this.node.getComponentInChildren(RichText);
|
|
if (richText) {
|
|
richText.string = content;
|
|
}
|
|
}
|
|
|
|
onClickClose(): void {
|
|
this.close(2);
|
|
}
|
|
}
|
|
|