YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
GameInput.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Graphics/Gui/GameInput/GameInput.hpp
"
2
3
namespace
yap
4
{
5
GameInput::GameInput
(GameInputType type,
GameInputEntry
* entry)
6
: type_ (type)
7
, entries_ ()
8
{
9
AddEntry
(entry);
10
}
11
12
GameInput::~GameInput
()
13
{
14
for
(
const
GameInputEntry
* it :
entries_
)
15
delete
it;
16
}
17
18
void
GameInput::AddEntry
(
GameInputEntry
* entry)
19
{
20
entries_
.
Add
(entry);
21
}
22
23
bool
GameInput::IsActive
()
const
24
{
25
for
(
const
GameInputEntry
* it :
entries_
)
26
if
(it->IsActive ())
27
return
true
;
28
29
return
false
;
30
}
31
32
bool
GameInput::IsActivated
()
const
33
{
34
for
(
const
GameInputEntry
* it :
entries_
)
35
if
(it->IsActivated ())
36
return
true
;
37
38
return
false
;
39
}
40
41
bool
GameInput::IsDeactivated
()
const
42
{
43
for
(
const
GameInputEntry
* it :
entries_
)
44
if
(it->IsDeactivated ())
45
return
true
;
46
47
return
false
;
48
}
49
50
bool
GameInput::IsActive
(
const
GuiEvent
& guiEvent)
const
51
{
52
for
(
const
GameInputEntry
* it :
entries_
)
53
if
(it->IsActive (guiEvent))
54
return
true
;
55
56
return
false
;
57
}
58
59
bool
GameInput::IsActivated
(
const
GuiEvent
& guiEvent)
const
60
{
61
for
(
const
GameInputEntry
* it :
entries_
)
62
if
(it->IsActivated (guiEvent))
63
return
true
;
64
65
return
false
;
66
}
67
68
bool
GameInput::IsDeactivated
(
const
GuiEvent
& guiEvent)
const
69
{
70
for
(
const
GameInputEntry
* it :
entries_
)
71
if
(it->IsDeactivated (guiEvent))
72
return
true
;
73
74
return
false
;
75
}
76
77
void
GameInput::BeginUpdate
()
78
{
79
for
(
GameInputEntry
* it :
entries_
)
80
it->BeginUpdate ();
81
}
82
83
void
GameInput::Update
(
const
GuiEvent
& guiEvent)
84
{
85
for
(
GameInputEntry
* it :
entries_
)
86
it->Update (guiEvent);
87
}
88
89
void
GameInput::EndUpdate
()
90
{
91
for
(
GameInputEntry
* it :
entries_
)
92
it->EndUpdate ();
93
}
94
95
GameInputType
GameInput::GetType
()
const
96
{
97
return
type_
;
98
}
99
}
// namespace yap
YAPOG
src
YAPOG
Graphics
Gui
GameInput
GameInput.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1