YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
GameInputEntry.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Graphics/Gui/GameInput/GameInputEntry.hpp
"
2
3
namespace
yap
4
{
5
GameInputEntry::GameInputEntry
()
6
: isActive_ (false)
7
, previousIsActive_ (false)
8
{
9
}
10
11
GameInputEntry::~GameInputEntry
()
12
{
13
}
14
15
void
GameInputEntry::Activate
(
bool
isActive)
16
{
17
previousIsActive_
=
isActive_
;
18
19
isActive_
= isActive;
20
}
21
22
bool
GameInputEntry::IsActive
()
const
23
{
24
return
isActive_
;
25
}
26
27
bool
GameInputEntry::IsActivated
()
const
28
{
29
return
isActive_
&& !
previousIsActive_
;
30
}
31
32
bool
GameInputEntry::IsDeactivated
()
const
33
{
34
return
!
isActive_
&&
previousIsActive_
;
35
}
36
37
bool
GameInputEntry::IsActive
(
const
GuiEvent
& guiEvent)
const
38
{
39
return
IsActive
() &&
GuiEventIsCompatible
(guiEvent);
40
}
41
42
bool
GameInputEntry::IsActivated
(
const
GuiEvent
& guiEvent)
const
43
{
44
return
IsActivated
() &&
GuiEventIsCompatible
(guiEvent);
45
}
46
47
bool
GameInputEntry::IsDeactivated
(
const
GuiEvent
& guiEvent)
const
48
{
49
return
IsDeactivated
() &&
GuiEventIsCompatible
(guiEvent);
50
}
51
52
void
GameInputEntry::BeginUpdate
()
53
{
54
if
(
IsActivated
())
55
previousIsActive_
=
true
;
56
else
if
(
IsDeactivated
())
57
previousIsActive_
=
false
;
58
}
59
60
void
GameInputEntry::EndUpdate
()
61
{
62
}
63
}
// namespace yap
YAPOG
src
YAPOG
Graphics
Gui
GameInput
GameInputEntry.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1