SFML community forums

Help => Window => Topic started by: sparklehorse on February 09, 2010, 08:54:02 pm

Title: TextEvent howto
Post by: sparklehorse on February 09, 2010, 08:54:02 pm
Hi all,

I would like to be able to get text input from the window created by SFML... but I don't know how:-) I expect that I have to explicitly set SFML to interpret all key events that follow as text events, as it is done in SDL 2. However, I have found nothing in the class documentation or the wiki/examples which points out how to do this.

So... when and how are text events generated?

Thanks for the help & best regards,

  Matthias
Title: TextEvent howto
Post by: Laurent on February 09, 2010, 09:25:11 pm
There's nothing to setup, just intercept the sf::TextEntered event in your event loop and that's it ;)
Title: That was easy!:-)
Post by: sparklehorse on February 09, 2010, 10:06:10 pm
Thanks!