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

Author Topic: Text input  (Read 1206 times)

0 Members and 2 Guests are viewing this topic.

Degri

  • Newbie
  • *
  • Posts: 2
    • View Profile
Text input
« on: March 02, 2019, 08:23:35 pm »
I've tried to make some text input in SFML but "input += event.text.unicode" removes what was previously written: when I draw a Text with "input" as string it shows the character currently pressed and then removes it when another key is pressed. What am I doing wrong?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Text input
« Reply #1 on: March 03, 2019, 12:09:59 am »
Can you provide a minimal but complete example of your code?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Degri

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Text input
« Reply #2 on: March 03, 2019, 07:31:48 am »
I'm sorry I bothered you, but while copying the code to another file to share it here I found out I made a really dumb mistake... Sorry again!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Text input
« Reply #3 on: March 03, 2019, 09:26:56 am »
No worries, happens to all of us. :)
Glad you figured it out.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything