YAPOG  0.0.1
Yet Another Pokemon Online Game
TextureManager.hpp
Go to the documentation of this file.
1 #ifndef TEXTURE_MANAGER_HPP
2 # define TEXTURE_MANAGER_HPP
3 
4 # include "YAPOG/Macros.hpp"
10 
11 namespace yap
12 {
13  class Texture;
14  struct IDrawingContext;
15 
17  public IDrawable,
18  public ISpatial
19  {
20  public:
21  TextureManager ();
22  TextureManager (Texture& baseTexture, uint width, uint height);
23  ~TextureManager ();
24 
25  void Init ();
26  void UpdatePosition ();
27 
28  virtual void Draw (IDrawingContext& context);
29  virtual bool IsVisible () const;
30  virtual void Show (bool isVisible);
31  virtual void ChangeColor (const sf::Color& color);
32 
33  virtual const Vector2& GetPosition () const;
34  virtual const Vector2& GetSize () const;
35 
36  virtual const Vector2& GetTopLeft () const;
37  virtual const Vector2& GetBottomRight () const;
38  virtual const Vector2& GetCenter () const;
39 
40  virtual const sf::FloatRect& GetRectangle () const;
41 
42  virtual void Move (const Vector2& offset);
43  virtual void Scale (const Vector2& factor);
44 
45  virtual void SetPosition (const Vector2& position);
46  virtual void SetSize (const Vector2& size);
47 
48  private:
49  void GetLimits (int& width, int& height);
51  bool isEnable_;
52  sf::Color color_;
54  bool isVisble_;
58  };
59 } // namespace yap
60 
61 #endif /* TEXTURE_MANAGER_HPP! */