Hello!
I'm trying to fade in (and out) my input text box.
Input text boxes don't seem to have an Opacity property so I can't set it to start at 0 without using CSS - and the Tween behaviour doesn't tween CSS.
I've tried using the Fade behaviour too, but that doesn't seem to work - it doesn't fade at all.
What's the correct way of doing this, please?
The text input object is an html element and doesn't play by the same rules as normal objects.
You can achieve the desired result by styling the text box with css. There is an opacity property in css you can adjust by utilizing tween - value with it.
Or you can make your own text input.
construct.net/en/tutorials/own-textbox-459
Develop games in your browser. Powerful, performant & highly capable.
Thanks oosyrag
I'm reading the documentation on Tween(Value) and it appears to tween some numbers, but I'm not sure how to keep applying that number to the opacity of the textInput over time.
I'm already using CSS to set the initial Opacity to 0.
Any more help appreciated!
On trigger-Tween value between 0 and 100 over x seconds
While tween is running, set css opacity to object.tween.value.
Or maybe it was 0 to 255, I forgot the range for opacity/alpha in css.