-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathactiontrigger.cpp
More file actions
52 lines (49 loc) · 1.2 KB
/
actiontrigger.cpp
File metadata and controls
52 lines (49 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <fea/ui/actiontrigger.hpp>
namespace fea
{
ActionTrigger::ActionTrigger() : gamepadId(0)
{
}
bool ActionTrigger::operator>(const ActionTrigger& other) const
{
if(type > other.type)
return true;
else if(type < other.type)
return false;
else
{
if(keyCode > other.keyCode)
return true;
else if(keyCode < other.keyCode)
return false;
else
{
if(gamepadId > other.gamepadId)
return true;
else
return false;
}
}
}
bool ActionTrigger::operator<(const ActionTrigger& other) const
{
if(type < other.type)
return true;
else if(type > other.type)
return false;
else
{
if(keyCode < other.keyCode)
return true;
else if(keyCode > other.keyCode)
return false;
else
{
if(gamepadId < other.gamepadId)
return true;
else
return false;
}
}
}
}