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
9001eb01
Commit
9001eb01
authored
Sep 15, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
44ffcbd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
NJ_MonkyTree.ts
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
+16
-11
No files found.
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
View file @
9001eb01
...
...
@@ -216,8 +216,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
richText
.
font
=
cc
.
find
(
"
Canvas/res/font/BRLNSDB
"
).
getComponent
(
cc
.
Label
).
font
;
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
// titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline}
// width=4>${name}</outline>`
const
label
=
titleNode
.
addComponent
(
cc
.
Label
);
label
.
string
=
name
;
label
.
fontSize
=
richText
.
fontSize
;
label
.
font
=
richText
.
font
;
});
...
...
@@ -278,22 +283,22 @@ export default class SceneComponent extends MyCocosSceneComponent {
console
.
log
(
'
idx:
'
,
idx
);
console
.
log
(
"
传入按钮名1:
"
,
name
);
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
titleNode
.
getComponent
(
cc
.
Label
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
;
console
.
log
(
"
显示按钮名1:
"
,
titleNode
.
getComponent
(
cc
.
RichText
).
string
);
console
.
log
(
"
显示按钮名1:
"
,
titleNode
.
getComponent
(
cc
.
Label
).
string
);
delayCall
(
1
,
()
=>
{
//
delayCall(1, () => {
console
.
log
(
'
idx:
'
,
idx
);
console
.
log
(
"
传入按钮名2:
"
,
name
);
//
console.log('idx: ', idx);
//
console.log("传入按钮名2:", name);
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
;
console
.
log
(
"
显示按钮名2:
"
,
titleNode
.
getComponent
(
cc
.
RichText
).
string
);
//
titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline}
//
width=4>${name}</outline>`;
//
console.log("显示按钮名2:", titleNode.getComponent(cc.RichText).string);
})
//
})
}
});
...
...
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