JoystickButtonPressed
From OxeyeWiki
(Difference between revisions)
Thewreck (Talk | contribs)
(Created page with '{{EngineHook| joystickButtonPressed | This hook is called when a joystick button changes state from not pressed to pressed. | {{MethodParam|joystick|A number|This is the joystick...')
(Created page with '{{EngineHook| joystickButtonPressed | This hook is called when a joystick button changes state from not pressed to pressed. | {{MethodParam|joystick|A number|This is the joystick...')
Latest revision as of 20:16, 19 January 2010
|
joystickButtonPressed | ||
|
This hook is called when a joystick button changes state from not pressed to pressed. | ||
| Parameter | Type | Description |
| joystick | A number | This is the joystick Id of the joystick the button belongs to. |
| button | A number | This is button number on the joystick. |
| Daisymoon Video Lib |
|---|
|
Example
local function joystickButtonHasBeenPressed(joy, btn)
print("joystick "..joy.. " button "..btn.. " pressed.")
end
hook.add("joystickButtonPressed", joystickButtonHasBeenPressed)