GDevelop
GDevelop copied to clipboard
Text input object improvements
- [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
Also hiding the layer the input text object is on does not hide the object.
Text input not properly hidden should be fixed by #3755, thanks for reporting!
Yes 5px padding would be great!
- [ ] Fix width and height of the Input text object.
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.
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.
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.
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"