5 #include <SFML/Graphics.hpp> 12 WallSFML::WallSFML(
double x,
double y, sf::RenderWindow &window,
const string &textureFile) : windowSFML(window), transformation(
Transformation::getInstance()) {
15 if(!texture.loadFromFile(textureFile)) {
16 throw runtime_error(
"Couldn't load wall texture image: " + textureFile);
18 texture.setSmooth(
true);
19 sprite.setTexture(texture);
22 sprite.setPosition(x, y);
26 sf::FloatRect rect = sprite.getLocalBounds();
37 windowSFML.draw(sprite);
void setSize(pair< double, double > newSize)
All the game gui elements of the Arkanoid game.
void setPosition(double x, double y)