GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

Text input object improvements

Open jack-ii opened this issue 2 years ago • 5 comments

  • [x] Hide actions doesn't work
  • [ ] Add width/height action
  • [ ] Move the "Disabled" checkbox next to the "Read only" checkbox
  • [ ] Move "Text color" to the FONT category and rename the category to TEXT APPEARANCE
  • [ ] Add font-weight
  • [ ] Add border-radius
  • [ ] Add text-align
  • [ ] Add maxlength
  • [ ] Add padding or hardcode ~5px. Looks always better than 0.
  • [ ] Offer a type choice dropdown in the "Input Type" condition/action

jack-ii avatar Mar 05 '22 12:03 jack-ii

Also hiding the layer the input text object is on does not hide the object.

HardTranceFan avatar Mar 14 '22 05:03 HardTranceFan

Text input not properly hidden should be fixed by #3755, thanks for reporting!

4ian avatar Mar 15 '22 23:03 4ian

Yes 5px padding would be great!

  • [ ] Fix width and height of the Input text object. image

Bouh avatar Apr 13 '22 08:04 Bouh

Fix width and height of the Input text object.

Just to flag that's it's a bit unlikely we'll be able to achieve anything pixel perfect there, because it's platform dependent.

4ian avatar Apr 13 '22 11:04 4ian

How borders are added is a problem. The scene editor shows 50% inside and 50% outside the object, the preview 100% outside. The field moves so that the position including the border remains the same. 01 I think reducing object height and width by border width*2 is the best solution. And show it in the editor 100% inside. Or 100% outside und reducing object X/Y by border width. (Or exactly that is the platform specific thing)

Also to center inpud fields, borders are a problem. 02

jack-ii avatar Apr 16 '22 09:04 jack-ii

Analysis of the type for each new property:

  • font-weight can be either a number (400) or a string (bold) => use a string
  • border-radius can be either a number of pixels (2px) or a percentage (50%) => use a string
  • text-align can be multiple string values => use a selector with 4 possible values (left, right, center, justify)
  • maxlength => number
  • padding can be either a number of pixels (5px) or a percentage (10%) but the percentage relates to the parent that is the div that contains the game => we should use a number to only allow to set padding via pixels count.
  • autofocus: it's not a css property, and I'm not sure it would behave as expected, I think it needs more research. It might be replaced by an action "Focus text input"

AlexandreSi avatar Mar 08 '23 17:03 AlexandreSi