YourGameLib
Loading...
Searching...
No Matches
Namespaces | Functions
input.cpp File Reference
#include <cmath>
#include "yourgame/input.h"
#include "yourgame_internal/input.h"
Include dependency graph for input.cpp:

Namespaces

namespace  yourgame_internal
 
namespace  yourgame_internal::input
 
namespace  yourgame
 
namespace  yourgame::input
 input functions
 

Functions

void yourgame_internal::input::setInput (yourgame::input::Source source, float value)
 set input value. used for buttons/keys if first input of source occurs, the last (previous) value is set to 0.0, resulting in positive value delta, if first input of source is "key down"
 
void yourgame_internal::input::setInput2 (yourgame::input::Source source, float value)
 set input value. used for positions/axes or other "continuous" signals if first input of source occurs, the last (previous) value is set to value, resulting in zero value delta after first input.
 
float yourgame::input::get (Source source)
 returns the current value of the input source source
 
int yourgame::input::geti (Source source)
 returns the current value of the input source source, rounded to int
 
float yourgame::input::getDelta (Source source)
 returns the value delta (current minus last frame value) of the input source source