YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
DialogBoxWidget.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_WIDGET_DIALOG_BOX_HPP
2
# define YAPOG_WIDGET_DIALOG_BOX_HPP
3
4
# include "
YAPOG/Graphics/Texture.hpp
"
5
# include "
YAPOG/Graphics/Gui/BaseWidget.hpp
"
6
# include "
YAPOG/Graphics/Gui/Label.hpp
"
7
# include "
YAPOG/System/IntTypes.hpp
"
8
# include "
YAPOG/Collection/Array.hpp
"
9
# include "
YAPOG/System/Time/UpdateableTimer.hpp
"
10
# include "
YAPOG/System/Event/Event.hpp
"
11
12
namespace
yap
13
{
14
class
YAPOG_LIB
DialogBoxWidget
:
public
BaseWidget
15
{
16
DISALLOW_COPY
(
DialogBoxWidget
);
17
18
public
:
19
Event<const BaseWidget&, const EmptyEventArgs&>
OnTextChanged
;
20
21
DialogBoxWidget
();
22
DialogBoxWidget
(
const
String
& content);
23
virtual
~
DialogBoxWidget
();
24
25
virtual
String
GetContent ()
const
;
26
virtual
void
AddText (
const
String
& contentArg);
27
virtual
bool
IsFocusable ()
const
;
28
void
SetShowText (
bool
state);
29
30
void
SkipText ();
31
32
protected
:
33
void
Refresh ();
34
virtual
bool
HandleOnEvent (
const
GuiEvent
& guiEvent);
35
virtual
Vector2
HandleGetSize ()
const
;
36
virtual
void
HandleMove (
const
Vector2
& offset);
37
virtual
void
HandleScale (
const
Vector2
& factor);
38
39
virtual
void
HandleDraw (
IDrawingContext
& context);
40
41
virtual
void
HandleShow (
bool
isVisible);
42
virtual
void
HandleChangeColor (
const
sf::Color& color);
43
44
virtual
void
HandleUpdate (
const
Time
& dt);
45
46
private
:
47
String
content_
;
48
collection::Array<Label*>
labels_
;
49
uint
currentText_
;
50
UpdateableTimer
textSpeed_
;
51
bool
showText_
;
52
53
};
54
}
// namespace yap
55
56
#endif
/* YAPOG_WIDGET_TEXT_BOX_HPP! */
YAPOG
include
YAPOG
Graphics
Gui
DialogBoxWidget.hpp
Generated on Mon Sep 17 2012 22:24:24 for YAPOG by
1.8.1.1