Commit 30e487a1 authored by 李维's avatar 李维

修改文字输入框对齐方式为左对齐,支持换行

parent d2ab9264
...@@ -34423,7 +34423,7 @@ ...@@ -34423,7 +34423,7 @@
} }
], ],
"_prefab": null, "_prefab": null,
"_opacity": 0, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 255,
......
...@@ -599,7 +599,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -599,7 +599,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
validater = this.setConnectionChoice(configItem, isDebug); validater = this.setConnectionChoice(configItem, isDebug);
this.scoreValidater.push(validater); this.scoreValidater.push(validater);
break; break;
// 文字输入 // 文字输入
case TEXTINPUT_GROUP: case TEXTINPUT_GROUP:
validater = this.setTextInputGroup(configItem, isDebug); validater = this.setTextInputGroup(configItem, isDebug);
this.scoreValidater.push(validater); this.scoreValidater.push(validater);
...@@ -1906,8 +1906,14 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1906,8 +1906,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
let text = await this.asyncShowKeyboardModal(lastText); let text = await this.asyncShowKeyboardModal(lastText);
const inputLabel = this.newInputTextNode(text, 0); const inputLabel = this.newInputTextNode(text, 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 = 0;
labelCom.overflow = 3;
currentInputText = text; currentInputText = text;
// 更新清除方法 // 更新清除方法
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment