SFML community forums

Help => General => Topic started by: czerwonymoskit on September 20, 2022, 09:47:49 am

Title: SFML 2.0 move the mouse and refresh window
Post by: czerwonymoskit on September 20, 2022, 09:47:49 am
I have two problems:
First. the program refreshes the screen only when I move the mouse, while when I do not move it, it stands still and does not display any messages.

Second. I have several text lines set up in exactly the same x, y position. Only at the end of the program do I have the application windowApplication.display () ;. Then these texts are displayed on top of each other. How to do this to eliminate this problem of text overlapping.
Title: Re: SFML 2.0 move the mouse and refresh window
Post by: eXpl0it3r on September 20, 2022, 09:26:12 pm
Your draw calls are most likely inside of the event loop, it should be outside. See the basic example on the documentation page: https://www.sfml-dev.org/documentation/2.5.1/

Not sure what you mean with different font, but if you draw them all the same position, they will of course all be rendered on top of each other.
If you don't want that, you need to set different positions?