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

Author Topic: SFML 2.0 move the mouse and refresh window  (Read 1002 times)

0 Members and 1 Guest are viewing this topic.

czerwonymoskit

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
SFML 2.0 move the mouse and refresh window
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 2.0 move the mouse and refresh window
« Reply #1 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?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything