Commit cac2f991 authored by limingzhe's avatar limingzhe

fix: debug

parent 8946bc5e
...@@ -1392,7 +1392,7 @@ cc.Class({ ...@@ -1392,7 +1392,7 @@ cc.Class({
quesBg.y = this.canvas.height + quesBg.height * quesBg.scale; quesBg.y = this.canvas.height + quesBg.height * quesBg.scale;
// const label = this.getRichText("你好吗aaaa", 100, "#2e4190", "#ffffff", 0); // 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.color = cc.Color.fromHEX(new cc.Color(), '#2e4190')
labelNode.y = -quesBg.height * quesBg.anchorY + 250; labelNode.y = -quesBg.height * quesBg.anchorY + 250;
this.quesLabel = labelNode.getComponent(cc.Label); this.quesLabel = labelNode.getComponent(cc.Label);
...@@ -1414,7 +1414,7 @@ cc.Class({ ...@@ -1414,7 +1414,7 @@ cc.Class({
}, },
getLabel(text, fontSize = 20) { getLabel(text, fontSize = 20, isFont=true) {
const labelNode = new cc.Node(); const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.Label); const label = labelNode.addComponent(cc.Label);
label.string = text; label.string = text;
...@@ -1424,7 +1424,9 @@ cc.Class({ ...@@ -1424,7 +1424,9 @@ cc.Class({
label.cacheMode = cc.Label.CacheMode.CHAR; label.cacheMode = cc.Label.CacheMode.CHAR;
label.font = cc.find('Canvas/res/font/MMTB').getComponent(cc.Label).font; if (isFont) {
label.font = cc.find('Canvas/res/font/MMTB').getComponent(cc.Label).font;
}
return labelNode; return labelNode;
}, },
...@@ -1478,7 +1480,7 @@ cc.Class({ ...@@ -1478,7 +1480,7 @@ cc.Class({
const optData = optionArr[i]; 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); const labelNodeShadow = this.getLabel(optData.text_en, 60);
if (resColor == 'yellow') { 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