Commit cac2f991 authored by limingzhe's avatar limingzhe

fix: debug

parent 8946bc5e
......@@ -1392,7 +1392,7 @@ cc.Class({
quesBg.y = this.canvas.height + quesBg.height * quesBg.scale;
// const label = this.getRichText("你好吗aaaa", 100, "#2e4190", "#ffffff", 0);
const labelNode = this.getLabel("你好吗", 100);
const labelNode = this.getLabel("你好吗", 100, false);
labelNode.color = cc.Color.fromHEX(new cc.Color(), '#2e4190')
labelNode.y = -quesBg.height * quesBg.anchorY + 250;
this.quesLabel = labelNode.getComponent(cc.Label);
......@@ -1414,7 +1414,7 @@ cc.Class({
},
getLabel(text, fontSize = 20) {
getLabel(text, fontSize = 20, isFont=true) {
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.Label);
label.string = text;
......@@ -1424,7 +1424,9 @@ cc.Class({
label.cacheMode = cc.Label.CacheMode.CHAR;
if (isFont) {
label.font = cc.find('Canvas/res/font/MMTB').getComponent(cc.Label).font;
}
return labelNode;
},
......@@ -1478,7 +1480,7 @@ cc.Class({
const optData = optionArr[i];
const labelNode = this.getLabel(optData.text_en, 60);
const labelNode = this.getLabel(optData.text_en, 60, true);
const labelNodeShadow = this.getLabel(optData.text_en, 60);
if (resColor == 'yellow') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment