1 decade ago by baldeagle76
Right now in my game, I have a "sign" entity that (unsurprisingly) displays text. However, I'd like the user to be able to type text on it. I used http://pointofimpactjs.com/snippets/view/16/entity-click to capture a click event on the sign, but I don't know how I could just have the user type on his/her keyboard and have that be the text on the sign. I've considered two options: use a text field outside of the canvas element , take the text from that element in the
Any suggestions?
update()
function and display it on the sign or bind an event to every single key on the keyboard with ig.input.bind
. The first one I don't like because I don't think it'll work in Ejecta, and the second one just seems... cumbersome.Any suggestions?