Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===============================================1===========================================================
- for ( auto text = textures.begin(); text != textures.end(); ++text )
- {
- *text = std::make_unique<sf::Texture>();
- if ( text == textures.begin() )
- {
- (*text)->loadFromFile(PATH_TO_BACKGROUND + "Menu" + EXTENSION);
- continue;
- }
- (*text)->loadFromFile(PATH_TO_BACKGROUND + std::to_string(std::distance(textures.begin(), text)) + EXTENSION);
- }
- ===============================================2===========================================================
- /*
- for ( size_t i = 0; i < BACKGROUND_COUNT; ++i )
- {
- textures[i] = new sf::Texture();
- if ( i == 0 )
- {
- textures[i]->loadFromFile(PATH_TO_BACKGROUND + "Menu" + EXTENSION);
- continue;
- }
- textures[i]->loadFromFile(PATH_TO_BACKGROUND + std::to_string(i) + EXTENSION);
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement