InputQuery.cpp
Go to the documentation of this file.
1 #include "InputQuery.hpp"
2 
3 namespace iv
4 {
5 
7  inst( inst ),
8  is( inst->getSystem< InputSystem >() )
9 {
10 }
11 
13 {
14  return this->inst;
15 }
16 
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 
32 {
33  if( !this->is )
34  return 0;
35  return this->is->input_character();
36 }
37 
38 }