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

Author Topic: How to disable the automatic scale  (Read 3185 times)

0 Members and 1 Guest are viewing this topic.

P@u1

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
How to disable the automatic scale
« on: April 22, 2011, 04:25:42 pm »
Hi everyone,

I'm writing a mario game and looking for a solution to disable the autmatic scale with is applied, when the window is resized.

Instead of rescaling the visible area should be enlarged.

What is the best way to achieve this?

I thought of changing the video mode and/or changing the camera, is this a good idea?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How to disable the automatic scale
« Reply #1 on: April 22, 2011, 05:52:22 pm »
You must resize the current view to the new size of the window (you must catch the sf::Event::Resized event).
Laurent Gomila - SFML developer

P@u1

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
How to disable the automatic scale
« Reply #2 on: April 22, 2011, 06:00:26 pm »
ok, thank you, I will try this.

Can u please explain me the difference / relationship between view and video mode?

I think I understand what a view does, but not, what the video mode does.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How to disable the automatic scale
« Reply #3 on: April 22, 2011, 06:03:24 pm »
A video mode is just a structure that gathers width, height and bpp. It does nothing. You use it only to set the size of a window when you create it.
Laurent Gomila - SFML developer