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.
45 lines
1.6 KiB
45 lines
1.6 KiB
//#region 文件引入
|
|
import { _decorator, Button, Component, Label, Node, sp, Sprite,Animation, RichText } from "cc";
|
|
import BaseUIForm from "../../Mgr_UI/BaseUIForm";
|
|
import FrameScrollView from "../../CComEx/FrameScrollView";
|
|
import { Global } from "../../Global";
|
|
import StringUtils from "../../ExUtils/StringUtils";
|
|
//#endregion 文件引入
|
|
const {ccclass, property,menu} = _decorator;
|
|
@ccclass("PopTalentDescUI_Proxy")
|
|
export default class PopTalentDescUI_Proxy extends BaseUIForm{
|
|
//#region 节点自动生成
|
|
//#endregion 节点自动生成
|
|
|
|
@property(FrameScrollView)
|
|
protected mScrollViewFrame: FrameScrollView;
|
|
|
|
onButtonClick(button:Button){
|
|
|
|
/**点击事件触发*/
|
|
switch (button) {
|
|
default:
|
|
ConsoleEx.Log(button);
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
addEvent(): void {
|
|
this.mScrollViewFrame.m_ItemRendererFuntion = this.ItemRenderer.bind(this);
|
|
}
|
|
|
|
protected start(): void {
|
|
this.mScrollViewFrame.m_ItemCount = Global.CsvMgr.Talen_array_csv.length;
|
|
}
|
|
|
|
//#region 拥有的目标功法类型 列表
|
|
ItemRenderer(idx:number,tNode:Node){
|
|
const config = Global.CsvMgr.Talen_array_csv[idx];
|
|
const name: Node = tNode.getChildByName("name");
|
|
const display: Node = tNode.getChildByName("display");
|
|
CNodeUtils.switchText(name, config.name);
|
|
CNodeUtils.switchText(display, StringUtils.format(config.display, config.prop1));
|
|
}
|
|
//#endregion
|
|
}
|