Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_systems
InputSystem
InputSystem
InputQuery.cpp
Go to the documentation of this file.
1
#include "
InputQuery.hpp
"
2
3
namespace
iv
4
{
5
6
InputQuery::InputQuery
(
iv::Instance
* inst ) :
7
inst( inst ),
8
is( inst->getSystem<
InputSystem
>() )
9
{
10
}
11
12
iv::Instance
*
InputQuery::instance
()
const
13
{
14
return
this->inst;
15
}
16
17
int2
InputQuery::input_position
(
Input::Key
key,
int
device_id )
18
{
19
if
( !this->is )
20
return
int2
( 0, 0 );
21
return
this->is->
input_position
( key, device_id );
22
}
23
24
float
InputQuery::input_value
(
Input::Key
key,
int
device_id )
25
{
26
if
( !this->is )
27
return
0.0f;
28
return
this->is->
input_value
( key, device_id );
29
}
30
31
unsigned
InputQuery::input_character
()
32
{
33
if
( !this->is )
34
return
0;
35
return
this->is->
input_character
();
36
}
37
38
}