RigsofRods
Soft-body Physics Simulation
Script2Game::InputEngineClass Class Reference

Binding of RoR::InputEngine; Manages input devices, their configuration (input.map ...) and state. More...

#include <InputEngineClass.h>

Public Member Functions

Input processing
void setEventSimulatedValue (inputEvents ev, float val)
 Set a permanent (you must also clear it!) override for an input event; Value can be between -1 and 1; Don't forget to reset back to 0! More...
 
Event info
string getEventCommand (inputEvents ev)
 
string getEventCommandTrimmed (inputEvents ev)
 
Event states


bool getEventBoolValue (inputEvents ev)
 
bool getEventBoolValueBounce (inputEvents ev, float time=0.2)
 
bool isKeyDownEffective (keyCodes keycode)
 Tells if the game recognizes the key as pressed (not blocked by game state or obscured by GUI). More...
 
bool isKeyDownValueBounce (keyCodes keycode, float time=0.2f)
 Get the safe "was key pressed?" value, optionally specifying the repeat ('bounce') interval. More...
 
Direct input device states
bool isKeyDown (keyCodes keycode)
 

Detailed Description

Binding of RoR::InputEngine; Manages input devices, their configuration (input.map ...) and state.

Note
This object is created automatically as global variable inputs.

Definition at line 16 of file InputEngineClass.h.

Member Function Documentation

◆ getEventBoolValue()

bool Script2Game::InputEngineClass::getEventBoolValue ( inputEvents  ev)
Returns
true if the event input is active (keyboard key pressed etc.).

◆ getEventBoolValueBounce()

bool Script2Game::InputEngineClass::getEventBoolValueBounce ( inputEvents  ev,
float  time = 0.2 
)
Returns
true if the event input is active (keyboard key pressed etc.) and the bouncing on/off cycle is in 'on' state.

◆ getEventCommand()

string Script2Game::InputEngineClass::getEventCommand ( inputEvents  ev)
Returns
full configuration string for given command, including the EXPL modifier.

◆ getEventCommandTrimmed()

string Script2Game::InputEngineClass::getEventCommandTrimmed ( inputEvents  ev)
Returns
configuration string for given command, omitting the EXPL modifier.

◆ isKeyDown()

bool Script2Game::InputEngineClass::isKeyDown ( keyCodes  keycode)

◆ isKeyDownEffective()

bool Script2Game::InputEngineClass::isKeyDownEffective ( keyCodes  keycode)

Tells if the game recognizes the key as pressed (not blocked by game state or obscured by GUI).

◆ isKeyDownValueBounce()

bool Script2Game::InputEngineClass::isKeyDownValueBounce ( keyCodes  keycode,
float  time = 0.2f 
)

Get the safe "was key pressed?" value, optionally specifying the repeat ('bounce') interval.

◆ setEventSimulatedValue()

void Script2Game::InputEngineClass::setEventSimulatedValue ( inputEvents  ev,
float  val 
)

Set a permanent (you must also clear it!) override for an input event; Value can be between -1 and 1; Don't forget to reset back to 0!


The documentation for this class was generated from the following file: