Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_MonkyTree
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
NJ_MonkyTree
Commits
849a0a81
Commit
849a0a81
authored
Sep 15, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug 字体不显示
parent
29fdedfc
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
651 additions
and
38 deletions
+651
-38
NJ_MonkyTree.meta
assets/NJ_MonkyTree.meta
+1
-21
NJ_MonkyTree.ts
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
+18
-17
yarn.lock
yarn.lock
+632
-0
No files found.
assets/NJ_MonkyTree.meta
View file @
849a0a81
{
"ver": "1.1.2",
"uuid": "b4b62bd3-1442-4e7e-8b59-38c0f3bf6c52",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {
"android": "default"
},
"optimizeHotUpdate": {
"android": true
},
"inlineSpriteFrames": {
"android": false
},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
{"ver":"1.1.2","uuid":"b4b62bd3-1442-4e7e-8b59-38c0f3bf6c52","isBundle":false,"bundleName":"","priority":1,"compressionType":{"android":"default"},"optimizeHotUpdate":{"android":true},"inlineSpriteFrames":{"android":false},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
View file @
849a0a81
...
...
@@ -204,23 +204,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
lock
.
active
=
true
;
const
titleNode
=
attr
.
querySelector
(
'
.title
'
);
const
outline
=
'
#000
'
;
const
name
=
""
;
const
richText
=
titleNode
.
getComponent
(
cc
.
RichText
);
if
(
!
richText
.
fontSizeBase
)
{
richText
.
fontSizeBase
=
richText
.
fontSize
;
}
richText
.
fontSize
=
richText
.
fontSizeBase
;
if
(
name
.
length
>
14
)
{
richText
.
fontSize
=
richText
.
fontSizeBase
*
0.7
;
}
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
delayCall
(
0.2
,
()
=>
{
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
})
// const outline = '#000';
// const name = "";
// const richText = titleNode.getComponent(cc.RichText);
// if ( !richText.fontSizeBase ) {
// richText.fontSizeBase = richText.fontSize;
// }
// richText.fontSize = richText.fontSizeBase;
// if (name.length > 14) {
// richText.fontSize = richText.fontSizeBase * 0.7;
// }
// titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline}
// width=4>${name}</outline>`
});
...
...
@@ -279,6 +275,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
;
delayCall
(
0.2
,
()
=>
{
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
;
})
}
});
...
...
yarn.lock
0 → 100644
View file @
849a0a81
This diff is collapsed.
Click to expand it.
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