SFML community forums
Help => Window => Topic started by: joaosausen on March 26, 2014, 07:46:04 pm
-
So, im trying to create a minimap on my game, the View for the game is working ok, but the minimap doesnt position well. Looks like the view for the minimap is not considering all the windows to determine his size.
If I use
minimap.setViewport(sf::FloatRect(0, 0, 0.25f, 0.25f));
this happens.
(http://i.imgur.com/8WSunut.png)
The View is not positioned at 0,0 and also has no 25% the size of the window. The other view is set has camera.setViewport(sf::FloatRect(0, 0, 1, 1)) and works well.
What can I do?
-
well, now everything is working.
I changed
minimap.setSize(10000, 8000);
minimap.setCenter(0, 0);
to
minimap.reset(sf::FloatRect(0,0,10000,8000));
and its working now, I still dont know why.
-
Not related to your problem, but you may want to fix those compiler errors that are visible in your screenshot ;)