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

Author Topic: Change text if press button  (Read 1232 times)

0 Members and 1 Guest are viewing this topic.

michasGH30

  • Newbie
  • *
  • Posts: 1
    • View Profile
Change text if press button
« on: March 10, 2019, 06:21:03 pm »
Hi!
I'm creating a simple text game.
I'm loading the text from file
I'm done the button, which is cleaning text.
But i don't know hot to change first line to second after press button.
When I was doing this in console, i'm just using for but here i don't know.
Thank you for anser.

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: Change text if press button
« Reply #1 on: March 10, 2019, 07:47:55 pm »
i don't really understand what your problem is.
how are you trying to do it?
Visit my game site (and hopefully help funding it? )
Website | IndieDB

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Change text if press button
« Reply #2 on: March 10, 2019, 08:46:16 pm »
You change text the same way you set it the first time. If you want to just change part of it, you'll have to do basic string manipulation.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything