Space Sheep Xtreme Turbo Penguin Edition
GraphicElement.h
Aller à la documentation de ce fichier.
1 #ifndef GRAPHICELEMENT_H
2 #define GRAPHICELEMENT_H
3 
11 #include <SFML/Graphics.hpp>
12 
20 class GraphicElement : public sf::Sprite
21 {
22  private:
23  int _w, _h;
24  bool _visible;
25 
26  public:
27 
32 
42  GraphicElement(sf::Image * image, int x, int y, int w, int h);
43 
47  virtual ~GraphicElement();
48 
49 
57  virtual void draw(sf::RenderWindow * _window);
58 
59 
64  void setPosition(const sf::Vector2f & pos);
65 
71  void setPosition(int x, int y);
72 
78  void resize(int w, int h);
79 
80 
88  bool getVisible() const;
89 
94  void setVisible(bool visible);
95 };
96 #endif
97