Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
ls_gramophone
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
ls_gramophone
Commits
0fcd8350
Commit
0fcd8350
authored
Jun 14, 2022
by
李帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+1
parent
6caca114
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
ls_gramophone.ts
assets/ls_gramophone/scene/ls_gramophone.ts
+2
-2
simpleLabel.ts
assets/ls_gramophone/script/simpleLabel.ts
+5
-4
No files found.
assets/ls_gramophone/scene/ls_gramophone.ts
View file @
0fcd8350
/*
/*
* @Author: ls
* @Author: ls
* @Date: 2022-05-15 18:22:18
* @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-06-14 17:
32:24
* @LastEditTime: 2022-06-14 17:
51:57
* @LastEditors: ls
* @LastEditors: ls
* @Description:
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts
* @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts
...
@@ -330,7 +330,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -330,7 +330,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
this
.
resetRecord
();
this
.
resetRecord
();
});
}
,
0.1
);
});
});
}
}
...
...
assets/ls_gramophone/script/simpleLabel.ts
View file @
0fcd8350
/*
/*
* @Author: ls
* @Author: ls
* @Date: 2022-05-21 18:06:20
* @Date: 2022-05-21 18:06:20
* @LastEditTime: 2022-06-
08 21:39:12
* @LastEditTime: 2022-06-
14 17:52:50
* @LastEditors: ls
* @LastEditors: ls
* @Description:
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\simpleLabel.ts
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\simpleLabel.ts
...
@@ -166,9 +166,10 @@ export default class simpleLabel extends cc.Component {
...
@@ -166,9 +166,10 @@ export default class simpleLabel extends cc.Component {
}
}
let
temp
=
element
;
let
temp
=
element
;
if
(
element
.
indexOf
(
'
,
'
)
!==
-
1
||
element
.
indexOf
(
'
.
'
)
!==
-
1
||
element
.
indexOf
(
'
!
'
)
!==
-
1
||
element
.
indexOf
(
'
?
'
)
!==
-
1
)
{
// TODO 处理标点符号
temp
=
temp
.
substring
(
0
,
temp
.
length
-
1
);
// if (element.indexOf(',') !== -1 || element.indexOf('.') !== -1 || element.indexOf('!') !== -1 || element.indexOf('?') !== -1) {
}
// temp = temp.substring(0, temp.length - 1);
// }
if
(
temp
===
str
)
{
if
(
temp
===
str
)
{
let
x
=
this
.
getLetterWidth
(
this
.
label
,
tempString
);
let
x
=
this
.
getLetterWidth
(
this
.
label
,
tempString
);
...
...
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