Building the tile selector
When working with tile maps, it is important to have a fast and intuitive way of accessing the tile-sheet, selecting its contents and painting them directly onto the game map. A good set of tools can give the artist the boost they have been looking for, while an unmanageable application is only a hindrance. Let us take a peek at what we are going to be building:
This interface, just like most others we have been working with, is going to be much easier to manage when wrapped in a class of its own:
class GUI_MapTileSelector {
public:
GUI_MapTileSelector(EventManager* l_eventManager,
GUI_Manager* l_guiManager, TextureManager* l_textureManager);
~GUI_MapTileSelector();
void Show();
void Hide();
bool IsActive() const;
void SetSheetTexture(const std::string& l_texture);
void UpdateInterface();
bool CopySelection(TileMap& l_tileMap) const;
void TileSelect(EventDetails* l_details...