Simulant  21.12-1292
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Friends | List of all members
smlt::GameController Class Reference

Public Member Functions

GameControllerID id () const
 
GameControllerIndex index () const
 
bool has_rumble_effect () const
 
bool start_rumble (float low_rumble, float high_rumble, const smlt::Seconds &duration)
 Start a rumble effect on the controller. More...
 
void stop_rumble ()
 
bool button_state (JoystickButton button) const
 
float axis_state (JoystickAxis axis) const
 
HatPosition hat_state (JoystickHatID hat) const
 
const uint8_t * platform_data () const
 

Friends

class InputState
 

Member Function Documentation

◆ start_rumble()

bool smlt::GameController::start_rumble ( float  low_rumble,
float  high_rumble,
const smlt::Seconds duration 
)

Start a rumble effect on the controller.

Parameters
Anormalized value (0.0f - 1.0f) of the intensity of the low motor
Anormalized value (0.0f - 1.0f) of the intensity of the high motor
Thetime in seconds to rumble for
Returns
True on success, false otherwise

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