Log in

View Full Version : Joystick buttons access


byteit101
14-01-2009, 16:09
Does anyone know how to access the buttons labeled 1,2,3,... on the joysticks in C/C++?

heydowns
14-01-2009, 17:09
Have a look at Joystick::GetRawButton().

byteit101
14-01-2009, 18:50
so,
if (Joystick::GetRawButton(2))//button 2 on the top
//complex code if this is pressed
or

Joystick stick(1);
if (stick.GetRawButton(2))//button 2 on the top
//complex code if this is pressed
Nothing else?

Eric Finn
14-01-2009, 19:38
The second one, and yes, that is fine.