Witem wie ktoś co mam zrobić w tej sytuacji? Szukam w necie coś co mi pomoże i nic ani i wszędzie mówią by użyć move ale move też mi na Sprite niedziała....
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow WIN( sf::VideoMode( 800, 600, 32 ), "Galaxy" );
sf::Texture tekstura;
tekstura.loadFromFile( "Icona.png" );
sf::Sprite obrazek;
obrazek.setTexture( tekstura );
while( WIN.isOpen() )
{
sf::Event zdarzenie;
sf::Event ruch;
while( WIN.pollEvent( zdarzenie ) )
{
if( zdarzenie.type == sf::Event::Closed )
WIN.close();
if( zdarzenie.type == sf::Event::KeyPressed && zdarzenie.key.code == sf::Keyboard::Escape )
WIN.close();
if( zdarzenie.type == sf::Event::MouseButtonPressed && zdarzenie.mouseButton.button == sf::Mouse::Middle )
WIN.close();
} WIN.setFramerateLimit( 60 );
obrazek.setPosition( 120, 280 );
WIN.clear( sf::Color::Red);
WIN.draw( obrazek );
WIN.display();
}
return 0;
}