Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM-28
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
YM-28
Commits
99f34e16
Commit
99f34e16
authored
May 15, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加字体
parent
c6f65552
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
Skin.ts
src/app/play/Skin.ts
+1
-1
play.component.css
src/app/play/play.component.css
+6
-0
play.component.ts
src/app/play/play.component.ts
+8
-4
tt0142m.ttf
src/assets/font/tt0142m.ttf
+0
-0
No files found.
src/app/play/Skin.ts
View file @
99f34e16
...
@@ -116,7 +116,7 @@ export class Skin {
...
@@ -116,7 +116,7 @@ export class Skin {
textLabel
.
text
=
exercises
.
exercisesData
.
text
;
textLabel
.
text
=
exercises
.
exercisesData
.
text
;
textLabel
.
textAlign
=
'
middle
'
;
textLabel
.
textAlign
=
'
middle
'
;
textLabel
.
fontSize
=
48
;
textLabel
.
fontSize
=
48
;
textLabel
.
fontName
=
"
FUTURAB
"
;
textLabel
.
fontName
=
"
FUTURAB
M
"
;
textLabel
.
fontColor
=
"
#626262
"
;
textLabel
.
fontColor
=
"
#626262
"
;
textLabel
.
setMaxSize
(
bg
.
width
);
textLabel
.
setMaxSize
(
bg
.
width
);
textLabel
.
refreshSize
();
textLabel
.
refreshSize
();
...
...
src/app/play/play.component.css
View file @
99f34e16
...
@@ -28,3 +28,9 @@
...
@@ -28,3 +28,9 @@
font-family
:
'GOTHIC'
;
font-family
:
'GOTHIC'
;
src
:
url("../../assets/font/GOTHIC.TTF")
;
src
:
url("../../assets/font/GOTHIC.TTF")
;
}
}
@font-face
{
font-family
:
'FUTURABM'
;
src
:
url("../../assets/font/tt0142m.TTF")
;
}
\ No newline at end of file
src/app/play/play.component.ts
View file @
99f34e16
...
@@ -3,7 +3,7 @@ import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListene
...
@@ -3,7 +3,7 @@ import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListene
import
{
import
{
Label
,
Label
,
MySprite
,
tweenChange
,
MySprite
,
tweenChange
,
ShapeRect
}
from
'
./Unit
'
;
}
from
'
./Unit
'
;
import
{
res
,
resAudio
}
from
'
./resources
'
;
import
{
res
,
resAudio
}
from
'
./resources
'
;
...
@@ -61,6 +61,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -61,6 +61,9 @@ export class PlayComponent implements OnInit, OnDestroy {
renderArr
;
renderArr
;
mapScale
=
1
;
mapScale
=
1
;
mapScaleX
=
1
;
mapScaleY
=
1
;
canvasLeft
;
canvasLeft
;
canvasTop
;
canvasTop
;
...
@@ -500,8 +503,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -500,8 +503,8 @@ export class PlayComponent implements OnInit, OnDestroy {
const
s
=
Math
.
min
(
sx
,
sy
);
const
s
=
Math
.
min
(
sx
,
sy
);
this
.
mapScale
=
s
;
this
.
mapScale
=
s
;
// this.mapScale
= sx;
this
.
mapScaleX
=
sx
;
// this.mapScale
= sy;
this
.
mapScaleY
=
sy
;
this
.
renderArr
=
[];
this
.
renderArr
=
[];
...
@@ -529,6 +532,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -529,6 +532,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
initTitle
()
{
initTitle
()
{
const
title
=
new
Title
(
this
.
data
.
title
,
this
.
images
);
const
title
=
new
Title
(
this
.
data
.
title
,
this
.
images
);
title
.
init
(
this
.
mapScale
,
this
.
mapScale
);
title
.
init
(
this
.
mapScale
,
this
.
mapScale
);
...
@@ -536,7 +540,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -536,7 +540,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
title
=
title
;
this
.
title
=
title
;
title
.
titleBg
.
y
=
0
;
title
.
titleBg
.
y
=
0
;
title
.
titleBg
.
x
=
6
0
;
title
.
titleBg
.
x
=
6
5
*
this
.
mapScaleX
;
this
.
renderArr
.
push
(
title
.
titleBg
);
this
.
renderArr
.
push
(
title
.
titleBg
);
}
}
...
...
src/assets/font/tt0142m.ttf
0 → 100644
View file @
99f34e16
File added
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