YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
"
5
# include "
YAPOG/Collection/Array.hpp
"
6
# include "
YAPOG/System/IntTypes.hpp
"
7
# include "
YAPOG/Graphics/IDrawable.hpp
"
8
# include "
YAPOG/Graphics/ISpatial.hpp
"
9
# include "
YAPOG/Graphics/SpatialInfo.hpp
"
10
11
namespace
yap
12
{
13
class
Texture;
14
struct
IDrawingContext;
15
16
class
YAPOG_LIB
TextureManager
:
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);
50
mutable
SpatialInfo
spatialInfo_
;
51
bool
isEnable_
;
52
sf::Color
color_
;
53
collection::Array<Texture*>
textures_
;
54
bool
isVisble_
;
55
uint
width_
;
56
uint
height_
;
57
Texture
*
baseTexture_
;
58
};
59
}
// namespace yap
60
61
#endif
/* TEXTURE_MANAGER_HPP! */
YAPOG
include
YAPOG
Graphics
Gui
TextureManager.hpp
Generated on Mon Sep 17 2012 22:24:24 for YAPOG by
1.8.1.1