PDA

View Full Version : Joystick buttons access


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

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

byteit101
01-14-2009, 05:50 PM
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
01-14-2009, 06:38 PM
The second one, and yes, that is fine.