1
Graphics / Re: [1.6] SFML how to have stuff appear only in a certain part of the window?
« on: April 01, 2013, 11:59:15 pm »
Thanks, I get the part about drawing onto the default viewport, but when I try to draw it into the the small view, the mapview if you will I do this:
Nothing seems to print at all?
And even if I switch the order of view's, it doesn't work?
#include "app.h"
void App::Loop(){
// Clear previous view first.
gameScreen.clear(sf::Color(24, 24, 24));
// Set map view
gameScreen.setView(mapView);
playerChar.setPosition(x, y);
gameScreen.draw(playerChar);
// Set interface view
gameScreen.setView(fullView);
}
void App::Loop(){
// Clear previous view first.
gameScreen.clear(sf::Color(24, 24, 24));
// Set map view
gameScreen.setView(mapView);
playerChar.setPosition(x, y);
gameScreen.draw(playerChar);
// Set interface view
gameScreen.setView(fullView);
}
Nothing seems to print at all?
And even if I switch the order of view's, it doesn't work?
#include "app.h"
void App::Loop(){
// Clear previous view first.
gameScreen.clear(sf::Color(24, 24, 24));
// Set interface view
gameScreen.setView(fullView);
// Set map view
gameScreen.setView(mapView);
playerChar.setPosition(x, y);
gameScreen.draw(playerChar);
}
void App::Loop(){
// Clear previous view first.
gameScreen.clear(sf::Color(24, 24, 24));
// Set interface view
gameScreen.setView(fullView);
// Set map view
gameScreen.setView(mapView);
playerChar.setPosition(x, y);
gameScreen.draw(playerChar);
}