YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
WidgetBackground.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_WIDGET_BACKGROUND_HPP
2
# define YAPOG_WIDGET_BACKGROUND_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/Graphics/Gui/BaseWidget.hpp
"
6
# include "
YAPOG/Graphics/Texture.hpp
"
7
# include "
YAPOG/Graphics/Gui/TextureManager.hpp
"
8
# include "
YAPOG/System/IntTypes.hpp
"
9
10
namespace
yap
11
{
12
class
YAPOG_LIB
WidgetBackground
:
public
BaseWidget
13
{
14
DISALLOW_COPY
(
WidgetBackground
);
15
16
public
:
17
18
struct
EventArgsTexture
19
{
20
Texture
&
newContent
;
21
EventArgsTexture
(
Texture
& content)
22
: newContent (content)
23
{
24
}
25
};
26
27
WidgetBackground
();
28
WidgetBackground
(
String
file,
bool
resize);
29
virtual
~
WidgetBackground
();
30
31
virtual
bool
IsFocusable ()
const
;
32
void
SetBackground (
String
file,
uint
width,
uint
height,
bool
resize);
33
void
SetBackground (
Vector2
size);
34
const
Texture
& GetBackground ()
const
;
35
Event<const WidgetBackground&, const EventArgsTexture&>
OnBackgroundSet
;
36
void
SetFixed (
bool
state);
37
bool
GetFixed ()
const
;
38
39
private
:
40
virtual
Vector2
HandleGetSize ()
const
;
41
42
virtual
void
HandleMove (
const
Vector2
& offset);
43
virtual
void
HandleScale (
const
Vector2
& factor);
44
45
virtual
void
HandleDraw (
IDrawingContext
& context);
46
47
virtual
void
HandleShow (
bool
isVisible);
48
virtual
void
HandleChangeColor (
const
sf::Color& color);
49
50
virtual
void
HandleUpdate (
const
Time
& dt);
51
52
Texture
background_
;
53
TextureManager
*
tm_
;
54
bool
resize_
;
55
bool
isInit
;
56
bool
fixed_
;
57
58
};
59
}
// namespace yap
60
61
#endif
/* YAPOG_WIDGET_BACKGROUND_HPP! */
YAPOG
include
YAPOG
Graphics
Gui
WidgetBackground.hpp
Generated on Mon Sep 17 2012 22:24:24 for YAPOG by
1.8.1.1