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

Author Topic: Images/Sprites change size when I resize the window.  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.

strongdrink

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Images/Sprites change size when I resize the window.
« on: March 07, 2011, 12:29:05 am »
Hello, I am new to SFML, and so far, I like it (more than SDL :D)
BUT! I am having a problem..

I am trying to make my app so if you resize the window, the images on the screen stay the same size. How would I go about doing this? Using veiws? Re-drawing the whole window?  :S

Thanks in advance!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Images/Sprites change size when I resize the window.
« Reply #1 on: March 07, 2011, 01:50:35 am »
If you don't want to adapt every object on the screen, manipulating sf::View is probably the simplest way. You can react to SFML's resize event by resizing your view correspondingly.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

strongdrink

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Images/Sprites change size when I resize the window.
« Reply #2 on: March 07, 2011, 01:59:50 am »
thanks

 

anything