korge
korge copied to clipboard
FR: Add a blinking cursor for uiTextInput when user clicks on it
Currently when u click in the input, no blinking cursor appears so it's not clear if it's currently being focused on.
Example when I click the text input for "Login" (no blinking cursor so u can't tell):
Feel free to make a PR:
Here's the relevant code: https://github.com/korlibs/korge/blob/3e92eb84f30e232caa98d01fcd3c6129a33e88c4/korge/src/korlibs/korge/text/TextEditController.kt#L60-L76
Since you have the container view, you can attach an interval there that will be disposed automatically. That interval can change the alpha from 0 to 1 at the required interval. visible = true/false could be used but it is already used internally, while alpha is not.