- C++ 17+
- SFML 3.0
This simple utility takes a "spritesheet" of possible repeating background tiles, and allows you to scroll through them (using the mouse or spacebar), previewing what each of them look like when displayed as a tiled background.
It also shows information indicating the tile in the spritesheet you're looking at.
Example render, previewing a tile from the "Grasses32x32_resized128x128.png" file (it looks blocky because the textures in that png file are meant to have an 8-bit feel. Your textures may be very different):

There are two constructors:
Constructor:
BackgroundTilePreviewer(std::string file_addr, int x_tile_size, int y_tile_size);
x_ and y_tile_size are the width and height (respectively) of the individual tiles you want returned, in pixels.
Example:
BackgroundTilePreviewer preview("tileGrasses128x128.png", 128, 128);
Constructor:
BackgroundTilePreviewer(std::string file_addr, int x_tile_size, int y_tile_size, int x_offset, int y_offset, int x_offset_between, int y_offset_between);
x_ and y_offset are the left and top margins (in pixels) respectively. x_ and y_offset_between are the spacing between the different tiles (in pixels).
Example:
BackgroundTilePreviewer preview("Grasses32x32_resized128x128.png", 128, 128, 4, 4, 12, 12);
This code is provided as-is; it's something I made for my own use, and am just sharing in case anybody else finds it useful.
Please feel free to use, but do not pass it off as your own.