Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
et_21
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
et_21
Commits
7b5a6164
Commit
7b5a6164
authored
Mar 01, 2021
by
Li MingZhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 按钮功能对调 去掉文本前后去空格功能
parent
82c6070f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
karaoke.js
play/assets/et_21/components/karaoke/scripts/karaoke.js
+13
-13
scene.js
play/assets/et_21/script/scene.js
+2
-2
No files found.
play/assets/et_21/components/karaoke/scripts/karaoke.js
View file @
7b5a6164
...
@@ -369,10 +369,10 @@ cc.Class({
...
@@ -369,10 +369,10 @@ cc.Class({
_tmpSentence
.
length
=
0
;
_tmpSentence
.
length
=
0
;
}
}
timePoint
=
hl
.
time
;
timePoint
=
hl
.
time
;
_tmpSentence
.
push
(
`<color=
${
this
.
lrcPlayedColor
.
toHEX
()}
>
${
hl
.
data
.
trim
()
}
</color>`
)
_tmpSentence
.
push
(
`<color=
${
this
.
lrcPlayedColor
.
toHEX
()}
>
${
hl
.
data
}
</color>`
)
}
else
{
}
else
{
hl
.
sentenceTimePhaseIndex
=
this
.
sentenceTimePhaseIndex
-
1
;
hl
.
sentenceTimePhaseIndex
=
this
.
sentenceTimePhaseIndex
-
1
;
_tmpSentence
.
push
(
`<color=
${
this
.
lrcPlayedColor
.
toHEX
()}
>
${
hl
.
data
.
trim
()
}
</color>`
)
_tmpSentence
.
push
(
`<color=
${
this
.
lrcPlayedColor
.
toHEX
()}
>
${
hl
.
data
}
</color>`
)
}
}
if
(
timePoint
)
{
if
(
timePoint
)
{
hl
.
timePoint
=
timePoint
;
hl
.
timePoint
=
timePoint
;
...
@@ -588,7 +588,7 @@ cc.Class({
...
@@ -588,7 +588,7 @@ cc.Class({
if
(
sentenceIndexObj
.
sentence
===
s
||
!
sentenceIndexObj
.
sentence
)
{
if
(
sentenceIndexObj
.
sentence
===
s
||
!
sentenceIndexObj
.
sentence
)
{
sentenceIndexObj
.
sentenceIndex
++
;
sentenceIndexObj
.
sentenceIndex
++
;
if
(
this
.
_lrcData
[
sentenceIndexObj
.
sentenceIndex
])
{
if
(
this
.
_lrcData
[
sentenceIndexObj
.
sentenceIndex
])
{
sentenceIndexObj
.
sentence
=
this
.
_lrcData
[
sentenceIndexObj
.
sentenceIndex
].
data
.
trim
()
;
sentenceIndexObj
.
sentence
=
this
.
_lrcData
[
sentenceIndexObj
.
sentenceIndex
].
data
;
}
}
return
;
return
;
}
}
...
@@ -723,33 +723,33 @@ cc.Class({
...
@@ -723,33 +723,33 @@ cc.Class({
}
}
const
playedColor
=
this
.
getPlayedColor
();
const
playedColor
=
this
.
getPlayedColor
();
let
played
=
this
.
_playedContent
.
map
((
line
,
idx
)
=>
{
let
played
=
this
.
_playedContent
.
map
((
line
,
idx
)
=>
{
let
words
=
`<color=
${
playedColor
}
param="
${
line
.
sentenceTimePhaseIndex
}
">
${
line
.
data
.
trim
()
}
</color>`
;
let
words
=
`<color=
${
playedColor
}
param="
${
line
.
sentenceTimePhaseIndex
}
">
${
line
.
data
}
</color>`
;
// let words = `<color=${this.lrcPlayedColor.toHEX()} click="clickPlay" param="${line.sentenceTimePhaseIndex}">${line.data
.trim()
}</color>`;
// let words = `<color=${this.lrcPlayedColor.toHEX()} click="clickPlay" param="${line.sentenceTimePhaseIndex}">${line.data}</color>`;
if
(
line
.
newLine
)
{
if
(
line
.
newLine
)
{
words
=
`
${
words
.
trim
()
}${
LINE_BEAKER
}
`
;
words
=
`
${
words
}${
LINE_BEAKER
}
`
;
}
}
return
words
;
return
words
;
})
})
const
playingColor
=
this
.
getPlayingColor
();
const
playingColor
=
this
.
getPlayingColor
();
let
playing
=
this
.
_playingContent
.
map
((
line
,
idx
)
=>
{
let
playing
=
this
.
_playingContent
.
map
((
line
,
idx
)
=>
{
let
words
=
`<color=
${
playingColor
}
param="
${
line
.
sentenceTimePhaseIndex
}
">
${
line
.
data
.
trim
()
}
</color>`
;
let
words
=
`<color=
${
playingColor
}
param="
${
line
.
sentenceTimePhaseIndex
}
">
${
line
.
data
}
</color>`
;
// let words = `<color=${this.lrcPlayingColor.toHEX()} click="clickPlay" param="${line.sentenceTimePhaseIndex}">${line.data
.trim()
}</color>`;
// let words = `<color=${this.lrcPlayingColor.toHEX()} click="clickPlay" param="${line.sentenceTimePhaseIndex}">${line.data}</color>`;
if
(
line
.
newLine
)
{
if
(
line
.
newLine
)
{
words
=
`
${
words
.
trim
()
}${
LINE_BEAKER
}
`
;
words
=
`
${
words
}${
LINE_BEAKER
}
`
;
}
}
return
words
;
return
words
;
})
})
// if (playing.startsWith(LINE_BEAKER)) {
// if (playing.startsWith(LINE_BEAKER)) {
// playing = playing.substr(LINE_BEAKER.length);
// playing = playing.substr(LINE_BEAKER.length);
// }
// }
// if (!playing
.trim()
) {
// if (!playing) {
// playing = `${playing} `
// playing = `${playing} `
// }
// }
let
remained
=
this
.
_remainContent
.
map
((
line
,
idx
)
=>
{
let
remained
=
this
.
_remainContent
.
map
((
line
,
idx
)
=>
{
let
words
=
`<color=
${
this
.
lrcBgColor
.
toHEX
()}
param="
${
line
.
sentenceTimePhaseIndex
}
">
${
line
.
data
.
trim
()
}
</color>`
;
let
words
=
`<color=
${
this
.
lrcBgColor
.
toHEX
()}
param="
${
line
.
sentenceTimePhaseIndex
}
">
${
line
.
data
}
</color>`
;
if
(
line
.
newLine
)
{
if
(
line
.
newLine
)
{
words
=
`
${
words
.
trim
()
}${
LINE_BEAKER
}
`
;
words
=
`
${
words
}${
LINE_BEAKER
}
`
;
}
}
return
words
;
return
words
;
})
})
...
@@ -777,7 +777,7 @@ cc.Class({
...
@@ -777,7 +777,7 @@ cc.Class({
setTitleText
(
lineArr
)
{
setTitleText
(
lineArr
)
{
if
(
lineArr
[
0
])
{
if
(
lineArr
[
0
])
{
// `<color=${this.lrcBgColor.toHEX()} param="${line.sentenceTimePhaseIndex}">${line.data
.trim()
}</color>`
// `<color=${this.lrcBgColor.toHEX()} param="${line.sentenceTimePhaseIndex}">${line.data}</color>`
lineArr
[
0
]
=
lineArr
[
0
].
replace
(
/b0445e/
,
"
f24443
"
)
lineArr
[
0
]
=
lineArr
[
0
].
replace
(
/b0445e/
,
"
f24443
"
)
lineArr
[
0
]
=
`<size=50>
${
lineArr
[
0
]}
<br/></size>`
lineArr
[
0
]
=
`<size=50>
${
lineArr
[
0
]}
<br/></size>`
...
...
play/assets/et_21/script/scene.js
View file @
7b5a6164
...
@@ -331,7 +331,7 @@ cc.Class({
...
@@ -331,7 +331,7 @@ cc.Class({
this
.
musicBtn
.
btnOn
.
active
=
true
;
this
.
musicBtn
.
btnOn
.
active
=
true
;
this
.
singBtn
.
btnOn
.
active
=
false
;
this
.
singBtn
.
btnOn
.
active
=
false
;
this
.
setItemsPlayMode
(
'
mode
1
'
);
this
.
setItemsPlayMode
(
'
mode
3
'
);
}
else
{
}
else
{
this
.
isMusicType
=
false
;
this
.
isMusicType
=
false
;
...
@@ -339,7 +339,7 @@ cc.Class({
...
@@ -339,7 +339,7 @@ cc.Class({
this
.
musicBtn
.
btnOn
.
active
=
false
;
this
.
musicBtn
.
btnOn
.
active
=
false
;
this
.
singBtn
.
btnOn
.
active
=
true
;
this
.
singBtn
.
btnOn
.
active
=
true
;
this
.
setItemsPlayMode
(
'
mode
3
'
);
this
.
setItemsPlayMode
(
'
mode
1
'
);
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment