Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I was wondering if there was any way I could make a textbox lose focus. There's an action to make it gain focus but none to lose it. I need it so I can make a chat box like those in rpgs where after typing and entering, the player should be able to use his/her arrow keys to move again.
Ashley should add this easy option to textbox.
Anyway, you can use calljs plugin.
First, add a textbox and set an <font color="red">ID_textbox</font> in the object's properties.
<font size="2">[i]When (action)[/i]
--> [b]CallJS[/b] - Execute [i]"var a=document.getElementById(""<font color="red">ID_textbox</font>""); a.blur();"[/i]</font>
And voila ;)
Develop games in your browser. Powerful, performant & highly capable.
Haha yes, that would be very handy if Ashley could :D
The calljs plugin looks very handy! Thanks for the work around! :D
septeven that's a great solution, one that didn't even cross my mind, though I've toiled with CallJS. Thanks for that!
And yep, I'd love to be able to easily get the focus back to the canvas.
Is this still the only way to remove a focus from a textbox?
The loose focus option was exactly what i was looking for.
It makes my app more user friendly!