Update RingRayLib - Constants - Add Gamepad Buttons.
KEY_Y = 89
KEY_Z = 90
- // Function keys
+# Function keys
+
KEY_SPACE = 32
KEY_ESCAPE = 256
KEY_ENTER = 257
KEY_RIGHT_BRACKET = 93
KEY_GRAVE = 96
- // Keypad keys
+# Keypad keys
+
KEY_KP_0 = 320
KEY_KP_1 = 321
KEY_KP_2 = 322
KEY_KP_ENTER = 335
KEY_KP_EQUAL = 336
-// Android buttons
+# Android buttons
KEY_BACK = 4
KEY_MENU = 82
KEY_VOLUME_UP = 24
KEY_VOLUME_DOWN = 25
-// Mouse buttons
+# Mouse buttons
+
MOUSE_LEFT_BUTTON = 0
MOUSE_RIGHT_BUTTON = 1
MOUSE_MIDDLE_BUTTON = 2
-// Gamepad number
+# Gamepad number
+
GAMEPAD_PLAYER1 = 0
GAMEPAD_PLAYER2 = 1
GAMEPAD_PLAYER3 = 2
GAMEPAD_PLAYER4 = 3
+# Gamepad Buttons
+
+ // This is here just for error checking
+ GAMEPAD_BUTTON_UNKNOWN = 0
+
+ // This is normally [A,B,X,Y]/[Circle,Triangle,Square,Cross]
+ // No support for 6 button controllers though..
+ GAMEPAD_BUTTON_LEFT_FACE_UP = 1
+ GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2
+ GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3
+ GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4
+
+ // This is normally a DPAD
+ GAMEPAD_BUTTON_RIGHT_FACE_UP = 5
+ GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6
+ GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8
+
+ // Triggers
+ GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9
+ GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12
+
+ // These are buttons in the center of the gamepad
+ GAMEPAD_BUTTON_MIDDLE_LEFT = 13 //PS3 Select
+ GAMEPAD_BUTTON_MIDDLE = 14 //PS Button/XBOX Button
+ GAMEPAD_BUTTON_MIDDLE_RIGHT = 15 //PS3 Start
+
+ // These are the joystick press in buttons
+ GAMEPAD_BUTTON_LEFT_THUMB = 16
+ GAMEPAD_BUTTON_RIGHT_THUMB = 17
+
func RayLibColor r,b,g,a
return GetColor( Bytes2Int( Char(r) + Char(g) + Char(b) + Char(a) ) )
