What I have done is divided the SpriteSheet in to columns, then used a scrollbar to shift through the objects. Basically, here is my code (which I just put together very quickly):
#include <iostream>
#include <TGUI/TGUI.hpp>
using namespace std;
int main()
{
tgui::Window window(sf::VideoMode(800, 600, 32), "Mapped Out");
window.globalFont.loadFromFile("data/DejaVuSans.ttf");
tgui::SpriteSheet *tileSheet = window.add<tgui::SpriteSheet>();
tileSheet->load("data/TileSet.png");
tileSheet->setPosition(0, 0);
tileSheet->setCells(1, 2);
tgui::Scrollbar* scroll = window.add<tgui::Scrollbar>();
scroll->load("objects/Scrollbar/BabyBlue");
scroll->setLowValue(1);
scroll->setMaximum(2);
scroll->verticalScroll = false;
scroll->setPosition(0, 50);
scroll->callbackID = 1;
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
window.handleEvent(event);
}
tgui::Callback callback;
while (window.getCallback(callback))
{
if(callback.callbackID == 1)
{
if(callback.trigger == tgui::Callback::valueChanged)
{
int scrollValue = scroll->getValue();
tileSheet->setVisibleCell(1, scrollValue + 1);
}
}
}
window.clear(sf::Color(100, 175, 255));
window.drawGUI();
window.display();
}
return 0;
}
My current tile sheet only has 2 tiles in it, but later on - when it gets bigger - I can divide in to 3 or more and go through them (so it will be like a "slide" on a Powerpoint presentation).
I will also have a look at using views, I think that might give me a smoother animation of scrolling.