Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Joystick buttons access (http://www.chiefdelphi.com/forums/showthread.php?t=72106)

byteit101 14-01-2009 16:09

Joystick buttons access
 
Does anyone know how to access the buttons labeled 1,2,3,... on the joysticks in C/C++?

heydowns 14-01-2009 17:09

Re: Joystick buttons access
 
Have a look at Joystick::GetRawButton().

byteit101 14-01-2009 18:50

Re: Joystick buttons access
 
so,
Code:

if (Joystick::GetRawButton(2))//button 2 on the top
//complex code if this is pressed

or
Code:

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

Re: Joystick buttons access
 
The second one, and yes, that is fine.


All times are GMT -5. The time now is 02:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi