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
3755b1c8
Commit
3755b1c8
authored
Jul 07, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加动态配置输入框行数代码
暂时注释-方案还不完善
parent
0169d504
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
keyboard_DG_FAF.ts
assets/DG_FAF/prefabs/keyboard/keyboard_DG_FAF.ts
+17
-0
No files found.
assets/DG_FAF/prefabs/keyboard/keyboard_DG_FAF.ts
View file @
3755b1c8
...
@@ -165,6 +165,23 @@ export default class NewClass extends cc.Component {
...
@@ -165,6 +165,23 @@ export default class NewClass extends cc.Component {
// 获取Editbox组件
// 获取Editbox组件
const
editBox
=
cc
.
find
(
"
textEditBox
"
,
this
.
editBoxContainer
).
getComponent
(
cc
.
EditBox
);
const
editBox
=
cc
.
find
(
"
textEditBox
"
,
this
.
editBoxContainer
).
getComponent
(
cc
.
EditBox
);
// 动态配置输入框行数代码
// const textEditBox = cc.find("textEditBox", this.editBoxContainer);
// // 获取Editbox组件
// const editBox = textEditBox.getComponent(cc.EditBox);
// const componentTextLabel = cc.find("TEXT_LABEL", textEditBox).getComponent(cc.Label);
// const PLACEHOLDER_LABEL = cc.find("PLACEHOLDER_LABEL", textEditBox).getComponent(cc.Label);
// const multipleLines = lineNum > 1 ? true : false; // 多行模式
// editBox.inputMode = multipleLines ? 0 : 6;
// cc.find("TEXT_LABEL", textEditBox).active = true;
// componentTextLabel.horizontalAlign = multipleLines ? 0 : 1;
// componentTextLabel.verticalAlign = multipleLines ? 0 : 1;
// componentTextLabel.enableWrapText = multipleLines ? true : false;
// PLACEHOLDER_LABEL.horizontalAlign = multipleLines ? 0 : 1;
// PLACEHOLDER_LABEL.verticalAlign = multipleLines ? 0 : 1;
// PLACEHOLDER_LABEL.enableWrapText = multipleLines ? true : false;
// textEditBox.height = lineNum * 80;
// 设置默认显示文字
// 设置默认显示文字
editBox
.
string
=
defaultText
;
editBox
.
string
=
defaultText
;
// 更新输入图标 空字符显示返回 非空显示对号
// 更新输入图标 空字符显示返回 非空显示对号
...
...
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