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

Author Topic: How to use TextEntered  (Read 1194 times)

0 Members and 1 Guest are viewing this topic.

èmji

  • Newbie
  • *
  • Posts: 17
    • View Profile
How to use TextEntered
« on: May 14, 2018, 07:46:47 pm »
Hello,

I don't know how to use TextEntered properly to let the user enter the name of a file after pressing a key.
What I did is that when the user presses a specific key (the C key), it activate a flag so event handler starts keeping user input in a buffer until the user presses 'Enter'. But this key ('C') is added to the buffer.

How can I avoid that?

Thank you.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How to use TextEntered
« Reply #1 on: May 14, 2018, 08:35:18 pm »
Enabling user input when C is released rather than pressed should do the job.
Laurent Gomila - SFML developer

èmji

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: How to use TextEntered
« Reply #2 on: May 14, 2018, 11:34:15 pm »
Thanks!

 

anything