Classes | |
| class | AxisList |
| AxisList is a class which simplifies access to the axes of a joystick, by providing an list syntax. More... | |
Public Member Functions | |
| double | GetAxisValue (int axisIndex) |
| Gets the current value for the given axis. Axis 0 is always the x-axis, axis 1 is always the y-axis on controlers which have this capability. | |
| void | Recalibrate () |
| Recalibrates this joystick. | |
| void | Poll () |
| Polls the joystick for data. | |
Properties | |
| string | Name [get] |
| Returns the name of the joystick. | |
| int | AxisCount [get] |
| Gets how many axes are available on this joystick. | |
| int | ButtonCount [get] |
| Returns the number of buttons this joystick has. | |
| AxisList | Axes [get] |
| Returns a list of the axes that are available on this joystick. | |
| bool[] | Buttons [get] |
| Returns an array indicating whether or not the joystick buttons are pushed. | |
| double | AxisThreshold [get, set] |
| Values smaller than this value for axes will be truncated and returned as zero. | |
| double | Xaxis [get] |
| Returns the value of the gamepad x-axis. Ranges are: -1 all the way to the left 0 centered 1 all the way to the right. | |
| double | Yaxis [get] |
| Returns the value of the gamepad y-axis. Ranges are: -1 all the way to the top 0 centered 1 all the way to the bottom. | |
| bool | PluggedIn [get] |
| Returns whether or not this joystick is plugged in. | |
| double AgateLib.InputLib.Old.Joystick.GetAxisValue | ( | int | axisIndex | ) |
Gets the current value for the given axis. Axis 0 is always the x-axis, axis 1 is always the y-axis on controlers which have this capability.
| axisIndex |
| void AgateLib.InputLib.Old.Joystick.Poll | ( | ) |
Polls the joystick for data.
| void AgateLib.InputLib.Old.Joystick.Recalibrate | ( | ) |
Recalibrates this joystick.
Behavior is driver-dependent, however this usually means taking the current position as the "zeroed" position for the joystick.
AxisList AgateLib.InputLib.Old.Joystick.Axes [get] |
Returns a list of the axes that are available on this joystick.
int AgateLib.InputLib.Old.Joystick.AxisCount [get] |
Gets how many axes are available on this joystick.
double AgateLib.InputLib.Old.Joystick.AxisThreshold [get, set] |
Values smaller than this value for axes will be truncated and returned as zero.
int AgateLib.InputLib.Old.Joystick.ButtonCount [get] |
Returns the number of buttons this joystick has.
bool [] AgateLib.InputLib.Old.Joystick.Buttons [get] |
Returns an array indicating whether or not the joystick buttons are pushed.
string AgateLib.InputLib.Old.Joystick.Name [get] |
Returns the name of the joystick.
bool AgateLib.InputLib.Old.Joystick.PluggedIn [get] |
Returns whether or not this joystick is plugged in.
If a joystick is removed, you must throw away the reference to this object and get a new one.
double AgateLib.InputLib.Old.Joystick.Xaxis [get] |
Returns the value of the gamepad x-axis. Ranges are: -1 all the way to the left 0 centered 1 all the way to the right.
Values outside this range may be returned. Never do tests which expect exact return values. Even digital gamepads will sometimes return values close to 1 when pushed down, instead of exactly 1.
double AgateLib.InputLib.Old.Joystick.Yaxis [get] |
Returns the value of the gamepad y-axis. Ranges are: -1 all the way to the top 0 centered 1 all the way to the bottom.
Values outside this range may be returned. Never do tests which expect exact return values. Even digital gamepads will sometimes return values close to 1 when pushed down, instead of exactly 1.
|
AgateLib Awesome Game and Tool Engine Library |
|