#include <omJoystickDriver.h>
Inheritance diagram for omJoystickDriver:
Public Member Functions | |
omJoystickDriver (omObject *, int, int, float, float, float, float, bool) | |
bool | GetError () |
void | Start () |
void | Stop () |
void | EnableAllButtons () |
void | DisableAllButtons () |
Private Member Functions | |
void | Notify () |
Timer notify. | |
Private Attributes | |
int | tickTime |
Pool time. | |
int | sxThreshold |
Runtime threshold. | |
int | dxThreshold |
Runtime threshold. | |
int | upThreshold |
Runtime threshold. | |
int | downThreshold |
Runtime threshold. | |
omObject * | toInform |
Object to inform. | |
bool | actionOnPress |
Flag. | |
wxJoystick * | joy |
joy object | |
bool | joystickConnected |
not(ErrorState) | |
bool | isSx |
Flag. | |
bool | isDx |
Flag. | |
bool | isUp |
Flag. | |
bool | isDown |
Flag. | |
bool | isButton |
Flag. | |
bool | allButtonsEnabled |
Flag. | |
int | buttonMask |
Button mask for GetButtonState(). |
This class is used as a driver for joystick events.
The position of the joystick cloche is rapresented by two integer values. X axis position is rapresented by a value that is 0 when the joystick is to the far left and is set to max when the joystick is to the far right.
Y axis position is rapresented by a value that is 0 when the joystick is in the forward position and is set to max when the joystick is in the backward position.
In the constructor of the class you specify the percentage of the axis that is considerated as left, as right, as up and as down.
This class generates events to object specified in the constructor.
|
Initialize the class.
|
|
Disable Action event sending when one of button 1,2 or 3 is pressed. |
|
Enable Action event sending when one of button 1,2 or 3 is pressed. |
|
Return error state.
|
|
Timer notify.
|
|
Start pooling joystick status Reimplemented from omObject. |
|
Stop pooling joystick status Reimplemented from omObject. |
|
Flag.
|
|
Flag.
|
|
Button mask for GetButtonState().
|
|
Runtime threshold.
|
|
Runtime threshold.
|
|
Flag.
|
|
Flag.
|
|
Flag.
|
|
Flag.
|
|
Flag.
|
|
joy object
|
|
not(ErrorState)
|
|
Runtime threshold.
|
|
Pool time.
|
|
Object to inform.
|
|
Runtime threshold.
|
Copyright © by Luca Clivio |