diff options
| author | victorfisac <victorfisac@gmail.com> | 2016-01-04 21:00:20 +0100 |
|---|---|---|
| committer | victorfisac <victorfisac@gmail.com> | 2016-01-04 21:00:20 +0100 |
| commit | ea500923565f66326e0ace470184374f158781d8 (patch) | |
| tree | e29f77d8099341bfcca95996ec58b130d458b72b /src/raylib.h | |
| parent | 0c539cbf320bf50309704ad768b2dfad4cd7a67a (diff) | |
| download | raylib-ea500923565f66326e0ace470184374f158781d8.tar.gz raylib-ea500923565f66326e0ace470184374f158781d8.zip | |
Add Android physic buttons input detection
- Added functions for detect when pressed, during down and when
released.
- Added defines for back, menu, volume up and down button numbers.
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h index f1203537..641eac4b 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -186,6 +186,12 @@ // TODO: Review Xbox360 USB Controller Buttons +// Android Physic Buttons +#define ANDROID_BACK 4 +#define ANDROID_MENU 82 +#define ANDROID_VOLUME_UP 24 +#define ANDROID_VOLUME_DOWN 25 + // Some Basic Colors // NOTE: Custom raylib color palette for amazing visuals on WHITE background #define LIGHTGRAY (Color){ 200, 200, 200, 255 } // Light Gray @@ -581,6 +587,9 @@ bool IsGamepadButtonUp(int gamepad, int button); // Detect if a gamepad b int GetTouchX(void); // Returns touch position X (relative to screen size) int GetTouchY(void); // Returns touch position Y (relative to screen size) Vector2 GetTouchPosition(void); // Returns touch position XY (relative to screen size) +bool IsButtonPressed(int button); // Detect if an android physic button has been pressed +bool IsButtonDown(int button); // Detect if an android physic button is being pressed +bool IsButtonReleased(int button); // Detect if an android physic button has been released //------------------------------------------------------------------------------------ // Gestures and Touch Handling Functions (Module: gestures) |
