Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Script2Game::InputEngineClass Class Reference

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.

Public Member Functions

Input processing
void setEventSimulatedValue (inputEvents ev, float val)
 
Event info
string getEventCommand (inputEvents ev)
 
string getEventCommandTrimmed (inputEvents ev)
 
Event states


float getEventValue (inputEvents eventID, bool pure=false, inputSourceType valueSource=inputSourceType::IST_ANY)
 
bool getEventBoolValue (inputEvents ev)
 
bool getEventBoolValueBounce (inputEvents ev, float time=0.2)
 
bool isKeyDownEffective (keyCodes keycode)
 
bool isKeyDownValueBounce (keyCodes keycode, float time=0.2f)
 
Direct input device states
bool isKeyDown (keyCodes keycode)
 

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.

◆ getEventValue()

float Script2Game::InputEngineClass::getEventValue ( inputEvents  eventID,
bool  pure = false,
inputSourceType  valueSource = inputSourceType::IST_ANY 
)
Returns
The current event input value.
Parameters
pureWhen true, the returned input value won't be adjusted for parameters such as deadzone or linearity on joysticks.
valueSourceIndicates the type of input device the event value should be retrieved from.

◆ 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: