Difference between revisions of "OnButtonDown"
Jump to navigation
Jump to search
no edit summary
imported>Pintocat |
imported>Pintocat |
||
Line 3: | Line 3: | ||
|summary = [[Event_Handling|Event]] block type that calls the [[User_Defined_Function|UDF]] when the gamepad button is pressed. The pressed button code (int) is passed to the UDF. | |summary = [[Event_Handling|Event]] block type that calls the [[User_Defined_Function|UDF]] when the gamepad button is pressed. The pressed button code (int) is passed to the UDF. | ||
Use any Button code after the ":" delimiter. | Use any Button code after the ":" delimiter. Button code int can be a bitmask of more than one button. | ||
|name = SetEventHandler "OnButtonDown:int" | |name = SetEventHandler "OnButtonDown:int" | ||
|returnVal = buttonID | |returnVal = buttonID | ||
Line 14: | Line 14: | ||
}} | }} | ||
== Example | == Example using either "A" or "B" == | ||
SetEventHandler "OnButtonDown" MyUDF | SetEventHandler "OnButtonDown:12288" MyUDF | ||
scn MyUDF | scn MyUDF |