Just finished section 10 of my course. While working through the code, I ran into a snag:

alaskalinuxuser@alaskalinuxuser-OptiPlex-7010:~/Documents/c++/Cpp_training/JelloStorm$ ./build.sh
JelloStorm.cpp: In function ‘int main()’:
JelloStorm.cpp:121:13: error: ‘class sf::Text’ has no member named ‘setFillColor’
pausedText.setFillColor(Color::White);

I triple checked with the instructor videos, and the instructor’s source code, and he put “setFillColor”. However, I couldn’t make that work like that. Perhaps it is due to an older version of SFML being used in the course than what I’m using now.

Fortunately, fixing the issue was easy:

pausedText.setColor(Color::White);

The setFillColor attribute still works for rectangle shapes and what not, but not for text. For text, you just use “setColor”.

hud

I love it when a problem is simple! Check out the whole commit, and the new Heads Up Display on my GitLab!

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *