#include <SFML/Graphics.hpp>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cmath>
using namespace std;
int main()
{
// Fenster erstellen
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics",sf::Style::Fullscreen);
App.SetFramerateLimit(60);
App.ShowMouseCursor(1);
sf::Image img;
img.LoadFromFile("eee.jpg");
sf::Sprite ele;
ele.SetImage(img);
ele.SetPosition(sf::Vector2f(111,110));
// SChleife
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
if ((Event.Type == Event.KeyPressed) && (Event.Key.Code == sf::Key::Escape))
{
App.Close();
}
if ((Event.Type == Event.KeyPressed) && (Event.Key.Code == sf::Key::F1))
{
ele.SetPosition(sf::Vector2f(0,0));
}
}
}
App.Draw(ele);
App.Display();
return 0;
}
i dont understand what i am doing wrong,,,