Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM5-20
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
YM5-20
Commits
f3e33862
Commit
f3e33862
authored
Apr 13, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
f50016c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
6 deletions
+45
-6
play.component.ts
src/app/play/play.component.ts
+45
-6
No files found.
src/app/play/play.component.ts
View file @
f3e33862
...
...
@@ -373,14 +373,53 @@ export class PlayComponent implements OnInit, OnDestroy {
})
bgCard
.
ref
.
addChild
(
numIcon
.
ref
)
let
textMain
=
this
.
g_cartoon
.
createLabel
(
dataItem
.
text_main
,
"
FuturaBT-Bold
"
,
"
#363333
"
,
48
,
pos
[
len
].
textMain
.
x
,
pos
[
len
].
textMain
.
y
,
null
,
225
)
bgCard
.
ref
.
addChild
(
textMain
)
let
textMainContainer
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
`popup-text-back-main-
${
i
}
-container`
,
386
,
100
,
"
#FFFF00
"
);
bgCard
.
ref
.
addChild
(
textMainContainer
.
ref
);
textMainContainer
.
ref
.
alpha
=
0
;
let
baseX
=
0
;
for
(
let
wi
=
0
;
wi
<
dataItem
.
letters_main
.
length
;
wi
++
)
{
let
letter
=
this
.
g_cartoon
.
createLabel
(
dataItem
.
letters_main
[
wi
].
letter_val
,
"
FuturaBT-Bold
"
,
dataItem
.
letters_main
[
wi
].
letter_color
,
48
*
1
,
baseX
,
50
,
"
left
"
)
let
bd
=
letter
.
getBoundingBox
();
baseX
+=
bd
.
width
+
1
textMainContainer
.
ref
.
addChild
(
letter
)
}
textMainContainer
.
ref
.
width
=
baseX
;
textMainContainer
.
ref
.
x
=
-
(
pos
[
len
].
textMain
.
x
+
baseX
)
/
2
;
textMainContainer
.
ref
.
y
=
pos
[
len
].
textMain
.
y
-
50
;
let
textLeftContainer
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
`popup-text-back-left-
${
i
}
-container`
,
386
,
100
,
"
#FFFF00
"
);
bgCard
.
ref
.
addChild
(
textLeftContainer
.
ref
);
textLeftContainer
.
ref
.
alpha
=
0
;
baseX
=
0
;
for
(
let
wi
=
0
;
wi
<
dataItem
.
letters_left
.
length
;
wi
++
)
{
let
letter
=
this
.
g_cartoon
.
createLabel
(
dataItem
.
letters_left
[
wi
].
letter_val
,
"
FuturaBT-Bold
"
,
dataItem
.
letters_left
[
wi
].
letter_color
,
42
*
1
,
baseX
,
50
,
"
left
"
)
let
bd
=
letter
.
getBoundingBox
();
baseX
+=
bd
.
width
+
1
textLeftContainer
.
ref
.
addChild
(
letter
)
}
textLeftContainer
.
ref
.
width
=
baseX
;
textLeftContainer
.
ref
.
x
=
pos
[
len
].
textLeft
.
x
-
baseX
/
2
;
textLeftContainer
.
ref
.
y
=
pos
[
len
].
textLeft
.
y
-
50
;
let
textRightContainer
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
`popup-text-back-right-
${
i
}
-container`
,
386
,
100
,
"
#FFFF00
"
);
bgCard
.
ref
.
addChild
(
textRightContainer
.
ref
);
textRightContainer
.
ref
.
alpha
=
0
;
baseX
=
0
;
for
(
let
wi
=
0
;
wi
<
dataItem
.
letters_right
.
length
;
wi
++
)
{
let
letter
=
this
.
g_cartoon
.
createLabel
(
dataItem
.
letters_right
[
wi
].
letter_val
,
"
FuturaBT-Bold
"
,
dataItem
.
letters_right
[
wi
].
letter_color
,
42
*
1
,
baseX
,
50
,
"
left
"
)
let
bd
=
letter
.
getBoundingBox
();
baseX
+=
bd
.
width
+
1
textRightContainer
.
ref
.
addChild
(
letter
)
}
textRightContainer
.
ref
.
width
=
baseX
;
textRightContainer
.
ref
.
x
=
pos
[
len
].
textRight
.
x
-
baseX
/
2
;
textRightContainer
.
ref
.
y
=
pos
[
len
].
textRight
.
y
-
50
;
let
textLeft
=
this
.
g_cartoon
.
createLabel
(
dataItem
.
text_left
,
"
FuturaBT-Bold
"
,
"
#363333
"
,
42
,
pos
[
len
].
textLeft
.
x
,
pos
[
len
].
textLeft
.
y
,
null
,
225
)
bgCard
.
ref
.
addChild
(
textLeft
)
//
let textLeft = this.g_cartoon.createLabel(dataItem.text_left, "FuturaBT-Bold", "#363333", 42, pos[len].textLeft.x, pos[len].textLeft.y, null, 225)
//
bgCard.ref.addChild(textLeft)
let
textRight
=
this
.
g_cartoon
.
createLabel
(
dataItem
.
text_right
,
"
FuturaBT-Bold
"
,
"
#363333
"
,
42
,
pos
[
len
].
textRight
.
x
,
pos
[
len
].
textRight
.
y
,
null
,
225
)
bgCard
.
ref
.
addChild
(
textRight
)
//
let textRight = this.g_cartoon.createLabel(dataItem.text_right, "FuturaBT-Bold", "#363333", 42, pos[len].textRight.x, pos[len].textRight.y, null, 225)
//
bgCard.ref.addChild(textRight)
let
targetLeft
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
`card_
${
i
}
_target_left`
,
260
,
110
,
"
#FFFF00
"
)
targetLeft
.
ref
.
x
=
pos
[
len
].
targetLeft
.
x
;
...
...
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