Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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
DG_FAF
Commits
8f2961c4
Commit
8f2961c4
authored
Jul 10, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置文字选项文本换行
parent
be56686a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+12
-0
defaultData_DG_FAF.ts
assets/DG_FAF/script/defaultData_DG_FAF.ts
+1
-1
No files found.
assets/DG_FAF/scene/DG_FAF.ts
View file @
8f2961c4
...
@@ -3590,8 +3590,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -3590,8 +3590,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
selectData
=
await
this
.
asyncShowSelectModal
(
optionList
,
"
textList
"
,
contentData
.
oplistCol2
?
true
:
false
);
let
selectData
=
await
this
.
asyncShowSelectModal
(
optionList
,
"
textList
"
,
contentData
.
oplistCol2
?
true
:
false
);
// 如果点击了取消 则还原上次显示
// 如果点击了取消 则还原上次显示
const
inputLabel
=
this
.
newInputTextNode
(
selectData
?
selectData
.
value
:
lastText
,
0
);
const
inputLabel
=
this
.
newInputTextNode
(
selectData
?
selectData
.
value
:
lastText
,
0
);
const
labelCom
=
inputLabel
.
getComponent
(
cc
.
Label
);
inputLabel
.
x
=
rect
.
width
/
2
;
inputLabel
.
x
=
rect
.
width
/
2
;
inputLabel
.
y
=
rect
.
height
/
2
;
inputLabel
.
y
=
rect
.
height
/
2
;
inputLabel
.
width
=
rect
.
width
;
inputLabel
.
height
=
rect
.
height
;
labelCom
.
horizontalAlign
=
1
;
// 超出宽度换行
labelCom
.
overflow
=
3
;
// 如果选择了数据 并且 选择的选项是配置了划线的 则显示划线 并把引用加1
// 如果选择了数据 并且 选择的选项是配置了划线的 则显示划线 并把引用加1
if
(
selectData
&&
selectData
.
strikeOutNode
)
{
if
(
selectData
&&
selectData
.
strikeOutNode
)
{
...
@@ -3778,8 +3784,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -3778,8 +3784,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
const
inputLabel
=
this
.
newInputTextNode
(
showLabel
,
0
);
const
inputLabel
=
this
.
newInputTextNode
(
showLabel
,
0
);
const
labelCom
=
inputLabel
.
getComponent
(
cc
.
Label
);
inputLabel
.
x
=
rect
.
width
/
2
;
inputLabel
.
x
=
rect
.
width
/
2
;
inputLabel
.
y
=
rect
.
height
/
2
;
inputLabel
.
y
=
rect
.
height
/
2
;
inputLabel
.
width
=
rect
.
width
;
inputLabel
.
height
=
rect
.
height
;
labelCom
.
horizontalAlign
=
1
;
// 超出宽度换行
labelCom
.
overflow
=
3
;
// 更新清除方法
// 更新清除方法
rect
.
cleanLast
=
()
=>
{
rect
.
cleanLast
=
()
=>
{
...
...
assets/DG_FAF/script/defaultData_DG_FAF.ts
View file @
8f2961c4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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