Commit 81ce15f6 authored by 李维's avatar 李维

添加单词排序历史记录显示

parent cba2428d
......@@ -863,6 +863,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
case CROSSWORD_PUZZLE:
this.showCrosswordPuzzleInput(configItem, resultData);
break;
// 文字排序
case SORT_WORDS:
this.showSortWords(configItem, resultData);
break;
}
})
......@@ -1375,6 +1379,45 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
// 单词排序 - 历史记录
showSortWords(configItem, resultData) {
const debugMode = false;
const hotZoneItemData = this.data.hotZoneItemArr[configItem.linkHotZoneIndex];
// 该题型需要配置一个显示正确错误符号的热区
const resultIconShowData = this.data.hotZoneItemArr[configItem.linkResultShowHotZoneIndex];
const resultIconRect = this.newRectNode(resultIconShowData, layer_2, debugMode);
this.newDecorativeFrame(hotZoneItemData, layer_1, "#FFFFFF", "#6dbef6", debugMode);
const rect = this.newRectNode(hotZoneItemData, layer_4, debugMode);
const textArr = []
resultData[0].sortedList.forEach(item => {
textArr.push(item.option.word)
});
const text = textArr.join(" ");
const inputLabel = this.newInputTextNode(text, 0);
inputLabel.x = rect.width / 2;
inputLabel.y = rect.height / 2;
rect.addChild(inputLabel);
// 对错号
const errIcon = getSprNode("icon_answer_wrong");
const rightIcon = getSprNode("icon_answer_right");
// 图标太大 缩小一半
errIcon.scale = rightIcon.scale = 0.5;
// 显示在热区的中间
errIcon.x = rightIcon.x = resultIconRect.width / 2;
errIcon.y = rightIcon.y = resultIconRect.height / 2;
if(resultData[0].right) {
resultIconRect.addChild(rightIcon);
} else {
resultIconRect.addChild(errIcon);
}
}
// 初始化分数牌
subScorePanels = [];
totalScorePanel = null;
......
This diff is collapsed.
This diff is collapsed.
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