Repository: 4ian/GDevelop
File: Extensions/TextInput/JsExtension.js (JavaScript)

Code before:
            : 255
          ).toString()
        )
        .setType('number')
        .setLabel(_('Opacity'))
        .setGroup(_('Border appearance'));

      objectProperties
        .getOrCreate('borderWidth')
        .setValue((objectContent.borderWidth || 0).toString())
        .setType('number')
        .setLabel(_('Width'))
        .setGroup(_('Border appearance'));

      objectProperties
        .getOrCreate('padding')
        .setValue((objectContent.padding || 0).toString())
        .setType('number')
        .setLabel(_('Padding'))
        .setGroup(_('Font'));
      objectProperties
        .getOrCreate('maxLength')
        .setValue((objectContent.maxLength || 0).toString())
        .setType('number')
        .setLabel(_('Max length'))
        .setDescription(_('The maximum length of the input value.'))
        .setAdvanced(true);

      objectProperties
        .getOrCreate('textAlign')
        .setValue(objectContent.textAlign || 'left')
        .setType('choice')
        .addExtraInfo('left')
        .addExtraInfo('center')
        .addExtraInfo('right')
        .setLabel(_('Text alignment'))
        .setGroup(_('Font'));

      return objectProperties;
    };
    textInputObject.content = {
      initialValue: '',
      placeholder: 'Touch to start typing',
      fontResourceName: '',
      fontSize: 20,
      inputType: 'text',
      textColor: '0;0;0',
      fillColor: '255;255;255',
      fillOpacity: 255,
      borderColor: '0;0;0',
      borderOpacity: 255,

Review comment (suggestion):
I added a comment on the PR, I think you should add in the description that this property will not be used if the input type is a number.

Code after:
            : 255
          ).toString()
        )
        .setType('number')
        .setLabel(_('Opacity'))
        .setGroup(_('Border appearance'));

      objectProperties
        .getOrCreate('borderWidth')
        .setValue((objectContent.borderWidth || 0).toString())
        .setType('number')
        .setLabel(_('Width'))
        .setGroup(_('Border appearance'));

      objectProperties
        .getOrCreate('padding')
        .setValue((objectContent.padding || 0).toString())
        .setType('number')
        .setLabel(_('Padding'))
        .setGroup(_('Font'));
      objectProperties
        .getOrCreate('maxLength')
        .setValue((objectContent.maxLength || 0).toString())
        .setType('number')
        .setLabel(_('Max length'))
        .setDescription(
          _(
            'The maximum length of the input value (this property will be ignored if the input type is a number).'
          )
        )
        .setAdvanced(true);

      objectProperties
        .getOrCreate('textAlign')
        .setValue(objectContent.textAlign || 'left')
        .setType('choice')
        .addExtraInfo('left')
        .addExtraInfo('center')
        .addExtraInfo('right')
        .setLabel(_('Text alignment'))
        .setGroup(_('Font'));

      return objectProperties;
    };
    textInputObject.content = {
      initialValue: '',
      placeholder: 'Touch to start typing',
      fontResourceName: '',
      fontSize: 20,
      inputType: 'text',
      textColor: '0;0;0',