I have SFML 2.0, and I have this code, but it says error
'class sf::Sprite' has no member named 'GetGlobalBounds'|
what am I doing wrong please?
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <iostream>
int main()
{
sf::RenderWindow App(sf::VideoMode(800,800,32),"SFML");
App.SetFramerateLimit(60);
sf::Texture Tex;
Tex.LoadFromFile("quad.png");
Tex.SetSmooth(false);
sf::Sprite pic(Tex);
pic.SetOrigin(50,50);
float x=400, y=300;
pic.SetPosition(x,y);
float angle=0;
while(App.IsOpened())
{
App.Clear();
sf::Event event;
while(App.PollEvent(event))
{
if((event.Type == sf::Event::KeyPressed) && (event.Key.Code == sf::Keyboard::Escape)) App.Close();
if(sf::Keyboard::IsKeyPressed(sf::Keyboard::Left))
angle--;
if(sf::Keyboard::IsKeyPressed(sf::Keyboard::Right))
angle++;
}
pic.SetRotation(angle);
App.Draw(pic);
sf::FloatRect c = pic.GetGlobalBounds();
App.Display();
}
return 0;
}