From c62f4fd057c03562365d7a68d1bacd104283540a Mon Sep 17 00:00:00 2001 From: Neyl Date: Mon, 20 Jan 2025 17:55:07 +0100 Subject: [PATCH] update JsExtensions --- Extensions/TextInput/JsExtension.js | 4 ++-- Extensions/TextInput/textinputruntimeobject.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Extensions/TextInput/JsExtension.js b/Extensions/TextInput/JsExtension.js index 82291621164c..1b84d0d8dd0d 100644 --- a/Extensions/TextInput/JsExtension.js +++ b/Extensions/TextInput/JsExtension.js @@ -218,7 +218,7 @@ module.exports = { objectProperties .getOrCreate('maxLength') - .setValue(objectContent.maxLength || 40) + .setValue(objectContent.maxLength || 0) .setType('number') .setLabel(_('Max length')) .setAdvanced(true); @@ -701,7 +701,7 @@ module.exports = { this._pixiGraphics = new PIXI.Graphics(); this._pixiTextMask = new PIXI.Graphics(); this._pixiText = new PIXI.Text(' ', { - align: 'right', + align: 'left', fontSize: 20, }); this._pixiText.mask = this._pixiTextMask; diff --git a/Extensions/TextInput/textinputruntimeobject.ts b/Extensions/TextInput/textinputruntimeobject.ts index 964c6af0da23..b52155d9d422 100644 --- a/Extensions/TextInput/textinputruntimeobject.ts +++ b/Extensions/TextInput/textinputruntimeobject.ts @@ -210,11 +210,10 @@ namespace gdjs { this.setReadOnly(newObjectData.content.readOnly); } if (oldObjectData.content.maxLength !== newObjectData.content.maxLength) { - this.SetMaxLength(newObjectData.content.maxLength); + this.setMaxLength(newObjectData.content.maxLength); } if (oldObjectData.content.textAlign !== newObjectData.content.textAlign) { this._textAlign = newObjectData.content.textAlign; - //this.setTextAlignement(newObjectData.content.textAlign); } if (oldObjectData.content.padding !== newObjectData.content.padding) { this.SetPadding(newObjectData.content.padding); @@ -543,7 +542,7 @@ namespace gdjs { getMaxLength(): integer { return this._maxLength; } - SetMaxLength(value: integer) { + setMaxLength(value: integer) { this._maxLength = value; this._renderer.updateMaxLength(); }