Commit ec9f638f authored by 李维's avatar 李维

dev commit

parent d35d1112
......@@ -263,7 +263,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
initTitle() {
let text = this.g_cartoon.createCartoonElementLabelFunc("main-title", this.g_formData.title.mainText, "Aileron-Black", "#000000", 76, (w, h)=>{
let text = this.g_cartoon.createCartoonElementLabelFunc("main-title", this.g_formData.title.mainText, "Aileron-Black", "#000000", 88, (w, h)=>{
return {
x: 160 * this.g_mapScale + w * this.g_mapScale / 2,
y: 65 * this.g_mapScale,
......@@ -345,7 +345,7 @@ export class PlayComponent implements OnInit, OnDestroy {
btnPreShadow.ref.visible = status;
}
let labelIndex = this.g_cartoon.createCartoonElementLabelFunc("question_index", "", "Aileron-Bold", "#3e9b31", 48, (w, h)=>{
let labelIndex = this.g_cartoon.createCartoonElementLabelFunc("question_index", "", "Aileron-Bold", "#3e9b31", 56, (w, h)=>{
return {
x: 0,
y: -110,
......@@ -421,7 +421,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
let text = this.g_cartoon.createCartoonElementLabelFunc(`key_${letter}`, letter, "Aileron-Bold", "#3e9b31", 72, (w, h)=>{
let text = this.g_cartoon.createCartoonElementLabelFunc(`key_${letter}`, letter, "Aileron-Black", "#3e9b31", 80, (w, h)=>{
return {
x: 0,
y: 0,
......@@ -541,10 +541,10 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
let text = this.g_cartoon.createCartoonElementLabelFunc(`block_${questionIndex}_${li}_letter`, "", "Aileron-Bold", "#FFFFFF", 72, (w, h)=>{
let text = this.g_cartoon.createCartoonElementLabelFunc(`block_${questionIndex}_${li}_letter`, "", "Aileron-Black", "#FFFFFF", 76, (w, h)=>{
return {
x: 0,
y: 0,
y: 2,
}
})
......@@ -942,7 +942,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
bgMiddleMask.ref.addChild(checkTop.ref)
let labelText = this.g_cartoon.createCartoonElementLabel("Chenck_label_title", "Check", "Aileron-Bold", "#FFFFFF", 52)
let labelText = this.g_cartoon.createCartoonElementLabel("Chenck_label_title", "Check", "Aileron-Bold", "#FFFFFF", 60)
checkTop.ref.addChild(labelText.ref);
let checkBottom = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_checnk_bottom`, "check_bottom", (w, h)=>{
......@@ -966,7 +966,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}, (w, h)=>{
return {
x: 0,
y: 250
y: 200
}
})
......@@ -1278,11 +1278,11 @@ export class PlayComponent implements OnInit, OnDestroy {
scrollContent.ref.addChild(text.ref)
let wordColorBG = this.g_cartoon.createCartoonElementShapeRect("eeeeee", 360, 64, data.right?"#007b3e":"#d71818");
wordColorBG.ref.radius = 10
wordColorBG.ref.radius = 16
wordColorBG.ref.y = totalHeight + padding + 64 / 2
totalHeight += padding + 64;
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.word, "DroidSansFallback", "#FFFFFF", 44)
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.word, "Aileron-Black", "#FFFFFF", 48)
word.ref.x = 360 / 2
word.ref.y = 64 / 2 + 5
wordColorBG.ref.addChild(word.ref);
......@@ -1302,7 +1302,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
totalHeight += 120 + padding;
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.rightWord, "DroidSansFallback", "#ffe9b1", 44)
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.rightWord, "Aileron-Black", "#ffe9b1", 52)
word.ref.x = 0
word.ref.y = 0
ele.ref.addChild(word.ref)
......@@ -1373,7 +1373,7 @@ export class PlayComponent implements OnInit, OnDestroy {
submitActive.ref.alpha = 0;
submit.ref.addChild(submitActive.ref)
let textSubmit = this.g_cartoon.createCartoonElementLabelFunc("button_submit_text", "Submit", "Aileron-Black", "#FFFFFF", 64, (w, h)=>{
let textSubmit = this.g_cartoon.createCartoonElementLabelFunc("button_submit_text", "Submit", "Aileron-Black", "#FFFFFF", 76, (w, h)=>{
return {
x: 0,
y: 0,
......@@ -1381,16 +1381,6 @@ export class PlayComponent implements OnInit, OnDestroy {
})
submit.ref.addChild(textSubmit.ref)
submit.switchActive = (status) => {
if(status) {
submitActive.ref.alpha = 1;
// this.m_canInput = false;
} else {
submitActive.ref.alpha = 0;
// this.m_canInput = true;
}
}
let btnSubmitShadow = this.g_cartoon.createCartoonElementImageFunc("btn_submit_shadow", "btn_submit_shadow", (w, h)=>{
return {
sx: 941 * this.g_mapScale / w,
......@@ -1403,6 +1393,20 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
submit.switchActive = (status) => {
if(status) {
submitActive.ref.alpha = 1;
btnSubmitShadow.ref.alpha = 1;
textSubmit.ref.fontColor = "#FFFFFF"
// this.m_canInput = false;
} else {
submitActive.ref.alpha = 0;
btnSubmitShadow.ref.alpha = 0;
textSubmit.ref.fontColor = "#f1e4c2"
// this.m_canInput = true;
}
}
submit.switchActive(false)
submit.out = (callback)=> {
btnSubmitShadow.ref.visible = false;
......@@ -1489,6 +1493,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 切换题目,主要是变蓝/变红输入框
switchQuestion(fromIndex, toIndex) {
this.g_cartoon.pauseAudio("sm_switch")
if(toIndex.toString().indexOf("-") != -1) {
let indexArr = toIndex.split("-")
fromIndex = indexArr[0]
......
......@@ -92,9 +92,7 @@ const localAudios = {
'sm-go': 'assets/default/audio/sm-go.mp3',
'sm-ready': 'assets/default/audio/sm-ready.mp3',
'button': 'assets/play/sound/button.mp3',
'popup': 'assets/play/sound/popup.mp3',
'correct': 'assets/play/sound/correct.mp3',
'sm_switch': 'assets/play/sound/sm_switch.mp3'
};
const multiSizeBackground = {
......
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