Hi guys
I will write a little Jump and Run but i have 1 Problem
My Compiler say that sf::sprite dont have the member loadFromFile
Code:
int main()
{
sf::RenderWindow Window(sf::VideoMode(800, 600, 32), "Blockjump");
sf::Event Event;
sf::Texture SFigur;
sf::Sprite PImage;
if (!PImage.loadFromFile("C:\\Programmiersachen\\sfml test\\bin\\Debug\\Spielfigur.png",sf::IntRect(0, 0, 128, 32)))
{
std::cout << "Spieler Image cant load!";
}
PImage.setTexture(SFigur);
while (Window.isOpen())
{
while(Window.pollEvent(Event))
{
if(Event.type == Event.KeyPressed);
{
if(Event.key.code == sf::Keyboard::Escape)
{
Window.close();
}
}
}
Window.clear(sf::Color(255,255,255));
Window.draw(PImage);
Window.display();
}
return 0;
}
thats the Debugger:
In function 'int main()':|
error: 'class sf::Sprite' has no member named 'loadFromFile'|