Greetings. Well, I basically have something that draws a 2D array of colored squares. Easy enough, and that part works. I wanted it to scroll, however, as I plan for the random generation to be much wider than a single screen.
view.move(100, 0);
std::cout << view.getCenter().x << "\n";
window.setView(view);
drawWorld(world);
std::cout << window.getView().getCenter().x << "\n";
Simple enough. Now, according to the debug lines, the window does have the same view as what it was set to. The view's center does move.
That is what it looks like. It started with the gradient in full view. The black space shows that the view moved. Changing the value (From 100) leaves different amounts of black space. However, it always looks like in the picture. It doesn't scroll.
What am I missing?
Also, the view (and the window) are members of a class, and the view is initialized like so, in the constructor:
view.reset(sf::FloatRect(0, 0, window.getSize().x, window.getSize().y));
view.setViewport(sf::FloatRect(0, 0, 1, 1));
[code]