Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_systems
InputSystem
InputBindingSystem
InputBinder.cpp
Go to the documentation of this file.
1
#include "
InputBinder.hpp
"
2
#include "
InputBindingSystem.hpp
"
3
4
#include <
ivorium_core/ivorium_core.hpp
>
5
6
namespace
iv
7
{
8
9
InputBinder::InputBinder
(
Instance
* inst ) :
10
cm( inst, this,
"InputBinder"
),
11
inst( inst ),
12
ies( inst->getSystemContainer()->getSystem<
InputBindingSystem
>() )
13
{
14
}
15
16
Instance
*
InputBinder::instance
()
17
{
18
return
this->inst;
19
}
20
21
void
InputBinder::BindKey
(
InputId
inputId,
Input::Key
key,
int
device_id )
22
{
23
if
( !this->ies )
24
return
;
25
26
this->ies->
BindKey
( inputId, key, device_id );
27
}
28
29
void
InputBinder::UnbindKey
(
InputId
inputId,
Input::Key
key,
int
device_id )
30
{
31
if
( !this->ies )
32
return
;
33
34
this->ies->
UnbindKey
( inputId, key, device_id );
35
}
36
37
void
InputBinder::BindHoverKey
(
InputId
inputId,
Input::Key
key,
int
device_id )
38
{
39
if
( !this->ies )
40
return
;
41
42
this->ies->
BindHoverKey
( inputId, key, device_id );
43
}
44
45
void
InputBinder::UnbindHoverKey
(
InputId
inputId,
Input::Key
key,
int
device_id )
46
{
47
if
( !this->ies )
48
return
;
49
50
this->ies->
UnbindHoverKey
( inputId, key, device_id );
51
}
52
53
}