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

Author Topic: text.setColor declared deprecated  (Read 14748 times)

0 Members and 2 Guests are viewing this topic.

Kerachi

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
text.setColor declared deprecated
« on: November 23, 2017, 09:47:36 pm »
Hi everyone!

It worked perfectly in CodeBlocks, but I keep getting this error in Visual Studio:


Any idea what am I doing wrong?
« Last Edit: November 23, 2017, 09:50:12 pm by Kerachi »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: text.setColor declared deprecated
« Reply #1 on: November 23, 2017, 10:17:14 pm »
The error message is tell you exactly what's going on. ;)

setColor has been deprecated, meaning it was replaced by something else.
Quickly checking the documentation will unveil that we now have setFillColor as replacement.

If you still want to use the old setColor function, you'll have to adjust your project configuration to not threat deprecations as error.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kerachi

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: text.setColor declared deprecated
« Reply #2 on: November 24, 2017, 08:59:20 am »
ehhh

I see, thanks.

NGM88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: text.setColor declared deprecated
« Reply #3 on: November 24, 2017, 07:13:04 pm »
You can
#define SFML_NO_DEPRECATED_WARNINGS
to use deprecated stuff

Kerachi

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: text.setColor declared deprecated
« Reply #4 on: November 24, 2017, 09:11:49 pm »
I do rather use sf::Text::setFillColor(), but thanks, it's good to know, how can I use deprecated stuff  :)

 

anything