-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial thoughts on a joystick implementation and some joystick docs.
- Loading branch information
1 parent
6c2309f
commit 3f7f673
Showing
6 changed files
with
210 additions
and
3 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
doc/src/references/builtin/user interface/enums/joystick_power_level.md
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,10 @@ | ||
# joystick_power_level | ||
Represents various charging states of a joystick. | ||
|
||
* JOYSTICK_POWER_UNKNOWN: the charging state is unknown. | ||
* JOYSTICK_POWER_EMPTY: the battery is empty (<= 5%). | ||
* JOYSTICK_POWER_LOW: the battery is low (<= 20%). | ||
* JOYSTICK_POWER_MEDIUM: the battery is medium (<= 70%). | ||
* JOYSTICK_POWER_FULL: the battery is full (<= 100%). | ||
* JOYSTICK_POWER_WIRED: the joystick is currently plugged in. | ||
* Note: it is not possible to get the battery level of the joystick while it is charging. |
17 changes: 17 additions & 0 deletions
17
doc/src/references/builtin/user interface/enums/joystick_type.md
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,17 @@ | ||
# joystick_type | ||
This enum represents the types of joysticks NVGT knows about. DO note that if you have a joystick that's not in this list, it will most likely still work, but you just won't be able to identify it by type. | ||
|
||
* JOYSTICK_TYPE_UNKNOWN: unknown joystick type. | ||
* JOYSTICK_TYPE_XBOX360: an XBOX 360 controller. | ||
* JOYSTICK_TYPE_XBOX1: an XBOX 1 series controller. | ||
* JOYSTICK_TYPE_PS3: a Playstation 3 controller. | ||
* JOYSTICK_TYPE_PS4: a Playstation 4 controller. | ||
* JOYSTICK_TYPE_NINTENDO_SWITCH_PRO: a controller for a non-lite (pro) Nintendo Switch. | ||
* JOYSTICK_TYPE_VIRTUAL: a virtual joystick (for example from a program like JoyToKey). | ||
* JOYSTICK_TYPE_PS5: a Playstation 5 controller. | ||
* JOYSTICK_TYPE_AMAZON_LUNA: an Amazon Luna controller. | ||
* JOYSTICK_TYPE_GOOGLE_STADIA: a Google Stadia controller. | ||
* JOYSTICK_TYPE_NVIDIA_SHIELD: an NVIDIA shield controller. | ||
* JOYSTICK_TYPE_NINTENDO_SWITCH_JOYCON_LEFT: the left joycon of a Nintendo Switch. | ||
* JOYSTICK_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT: the right joycon of a Nintendo Switch. | ||
* JOYSTICK_TYPE_NINTENDO_SWITCH_JOYCON_PAIR: both joycons of a Nintendo switch. |
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
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
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
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,4 @@ | ||
void main() { | ||
int joysticks = joystick_count; | ||
screen_reader_speak("Your system has " + joysticks + " " + (joysticks == 1 ? "joystick" : "joysticks") + " connected", true); | ||
} |