Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: TextEvent howto  (Read 1685 times)

0 Members and 1 Guest are viewing this topic.

sparklehorse

  • Newbie
  • *
  • Posts: 5
    • View Profile
TextEvent howto
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
TextEvent howto
« Reply #1 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 ;)
Laurent Gomila - SFML developer

sparklehorse

  • Newbie
  • *
  • Posts: 5
    • View Profile
That was easy!:-)
« Reply #2 on: February 09, 2010, 10:06:10 pm »
Thanks!

 

anything