-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
377 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
runreadmelang.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
# XInput | ||
# XInput | ||
## A simple to use interface to the XInput API for Python\. | ||
**XInput** provides a few simple methods that can be used to query controller information\. | ||
|
||
## Tiny Documentation | ||
### Using XInput | ||
XInput provides a few functions: | ||
`get_connected() -> (bool, bool, bool, bool)` Query which controllers are connected \(note: don't query each frame\) | ||
|
||
`get_state(user_index) -> State` Get the State of the controller `user_index` | ||
|
||
`get_button_values(state) -> dict` Returns a dictionary, showing which buttons are currently being pressed\. | ||
|
||
`get_trigger_values(state) -> (LT, RT)` Returns a tuple with the values of the left and right triggers in range `0.0` to `1.0` | ||
|
||
`get_thumb_values(state) -> ((LX, LY), (RX, RY))` Returns the values of the thumb sticks, expressed in X and Y ranging from `0.0` to `1.0` | ||
|
||
`set_vibration(user_index, left_speed, right_speed) -> bool (Success)` Sets the vibration of the left and right motors of `user_index` to values between `0` and `65535` or in range `0.0` to `1.0` respectively\. | ||
|
||
`get_battery_information(user_index) -> (<type>, <level>)` Returns the battery information for `user_index` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[title]XInput[/title] | ||
[subtitle]A simple to use interface to the XInput API for Python.[/subtitle] | ||
[b]XInput[/] provides a few simple methods that can be used to query controller information. | ||
|
||
[s1]Tiny Documentation[/] | ||
[s2]Using XInput[/] | ||
XInput provides a few functions: | ||
[code]get_connected() -> (bool, bool, bool, bool)[/code] Query which controllers are connected (note: don't query each frame) | ||
|
||
[code]get_state(user_index) -> State[/code] Get the State of the controller [code]user_index[/code] | ||
|
||
[code]get_button_values(state) -> dict[/code] Returns a dictionary, showing which buttons are currently being pressed. | ||
|
||
[code]get_trigger_values(state) -> (LT, RT)[/code] Returns a tuple with the values of the left and right triggers in range [code]0.0[/] to [code]1.0[/] | ||
|
||
[code]get_thumb_values(state) -> ((LX, LY), (RX, RY))[/code] Returns the values of the thumb sticks, expressed in X and Y ranging from [code]0.0[/] to [code]1.0[/] | ||
|
||
[code]set_vibration(user_index, left_speed, right_speed) -> bool (Success)[/code] Sets the vibration of the left and right motors of [code]user_index[/] to values between [code]0[/] and [code]65535[/] or in range [code]0.0[/] to [code]1.0[/] respectively. | ||
|
||
[code]get_battery_information(user_index) -> (<type>, <level>)[/] Returns the battery information for [code]user_index[/] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
###### | ||
XInput | ||
###### | ||
|
||
******************************************************** | ||
A simple to use interface to the XInput API for Python\. | ||
******************************************************** | ||
| **XInput** provides a few simple methods that can be used to query controller information\. | ||
| | ||
Tiny Documentation | ||
================== | ||
|
||
Using XInput | ||
------------ | ||
| XInput provides a few functions\: | ||
| :code:`get_connected() -> (bool, bool, bool, bool)` Query which controllers are connected \(note\: don\'t query each frame\) | ||
| | ||
| :code:`get_state(user_index) -> State` Get the State of the controller :code:`user_index` | ||
| | ||
| :code:`get_button_values(state) -> dict` Returns a dictionary\, showing which buttons are currently being pressed\. | ||
| | ||
| :code:`get_trigger_values(state) -> (LT, RT)` Returns a tuple with the values of the left and right triggers in range :code:`0.0` to :code:`1.0` | ||
| | ||
| :code:`get_thumb_values(state) -> ((LX, LY), (RX, RY))` Returns the values of the thumb sticks\, expressed in X and Y ranging from :code:`0.0` to :code:`1.0` | ||
| | ||
| :code:`set_vibration(user_index, left_speed, right_speed) -> bool (Success)` Sets the vibration of the left and right motors of :code:`user_index` to values between :code:`0` and :code:`65535` or in range :code:`0.0` to :code:`1.0` respectively\. | ||
| | ||
| :code:`get_battery_information(user_index) -> (<type>, <level>)` Returns the battery information for :code:`user_index` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.