|
@@ -1,4 +1,4 @@
|
|
|
-import { _decorator, instantiate, Label, Node, Prefab, SpotLight, Sprite, tween, UIOpacity } from 'cc';
|
|
|
+import { _decorator, instantiate, Label, Node, Prefab, RichText, SpotLight, Sprite, tween, UIOpacity } from 'cc';
|
|
|
import { BaseView } from '../../../framework/layer/BaseView';
|
|
|
import { StringUtil } from '../../../framework/util/StringUtil';
|
|
|
import { Equip } from '../../data/EquipData';
|
|
@@ -15,9 +15,6 @@ export class EquipOpreate extends BaseView {
|
|
|
@property({ type: Label, tooltip: "关闭提示" })
|
|
|
closeTips: Label = null;
|
|
|
|
|
|
- @property({ type: Label, tooltip: "标题" })
|
|
|
- titieTx: Label = null;
|
|
|
-
|
|
|
@property({ type: Node, tooltip: "图标节点" })
|
|
|
itemNode: Node = null;
|
|
|
|
|
@@ -30,14 +27,14 @@ export class EquipOpreate extends BaseView {
|
|
|
@property({ type: Label, tooltip: "部位" })
|
|
|
slotTx: Label = null;
|
|
|
|
|
|
+ @property({ type: Label, tooltip: "描述标题" })
|
|
|
+ descTitieTx: Label = null;
|
|
|
+
|
|
|
@property({ type: Label, tooltip: "描述" })
|
|
|
descTx: Label = null;
|
|
|
|
|
|
- @property({ type: Label, tooltip: "属性标题" })
|
|
|
- attrTitieTx: Label = null;
|
|
|
-
|
|
|
- @property({ type: Label, tooltip: "属性" })
|
|
|
- attrTx: Label = null;
|
|
|
+ @property({ type: RichText, tooltip: "属性" })
|
|
|
+ attrTx: RichText = null;
|
|
|
|
|
|
@property({ type: Sprite, tooltip: "替换/卸下按钮图" })
|
|
|
wearBtnSp: Sprite = null;
|
|
@@ -59,8 +56,7 @@ export class EquipOpreate extends BaseView {
|
|
|
protected onLoad() {
|
|
|
super.onLoad();
|
|
|
this.closeTips.string = StringUtil.getLanguageData('点击空白关闭');
|
|
|
- this.titieTx.string = StringUtil.getLanguageData('装备详情');
|
|
|
- this.attrTitieTx.string = StringUtil.getLanguageData('属性加成');
|
|
|
+ this.descTitieTx.string = StringUtil.getLanguageData('装备描述');
|
|
|
this.wearBtnTx.string = StringUtil.getLanguageData('替换');
|
|
|
this.updateBtnTx.string = StringUtil.getLanguageData('升级');
|
|
|
this.strongBtnTx.string = StringUtil.getLanguageData('突破');
|
|
@@ -142,18 +138,19 @@ export class EquipOpreate extends BaseView {
|
|
|
this.slotTx.string = `${StringUtil.getLanguageData('装备位置')}: ${StringUtil.getLanguageData('部位' + this._curEquip.conf['Slot'])}`;
|
|
|
this.descTx.string = StringUtil.getLanguageData(this._curEquip.conf['Desc']);
|
|
|
|
|
|
- let attrStr = "";
|
|
|
+ let attrName = "";
|
|
|
+ let attrNum = "";
|
|
|
for (let index = 1; index <= 2; index++) {
|
|
|
let Stat = this._curEquip.conf['Stat' + index];
|
|
|
if (Stat != 0) {
|
|
|
let attr = Stat.split(':');
|
|
|
let attrConf = AttrConf[attr[0]]
|
|
|
- let value = attrConf.type == AttrAddTypeEnum.reality ? ("+" + attr[1]) :
|
|
|
- ("+" + (100 * Number(attr[1])) + "%")
|
|
|
- attrStr = attrStr + StringUtil.getLanguageData(attrConf.name) + ' ' + value + "\n";
|
|
|
+ attrNum = attrConf.type == AttrAddTypeEnum.reality ? (attr[1]) :
|
|
|
+ ((100 * Number(attr[1])) + "%")
|
|
|
+ attrName = StringUtil.getLanguageData(attrConf.name)
|
|
|
}
|
|
|
}
|
|
|
- this.attrTx.string = attrStr;
|
|
|
+ this.attrTx.string = `<b><outline color=black width=2><color=#ffffff>${attrName}: </color><color=#FDD818 >${attrNum}</color></outline></b>`;
|
|
|
}
|
|
|
|
|
|
}
|