STRIG(n) - mkilgore/QB64pe GitHub Wiki
The STRIG(n) statement controls event trapping for a particular joystick or game pad device button.
- STRIG(button%) {ON|OFF|STOP}
- STRIG[(button_function%[,])] {ON|OFF|STOP}
- button function specifies the device's button function. Even functions record events while odd ones read the actual presses.
- QB64 can designate a button function and controller device number from 0 to 256.
- When no parameters are used QB64 enables, disables or suspends the reading of ALL button events.
- ON specifies that event trapping is turned on for the specified button.
- OFF specifies that event trapping is turned off for the specified button.
- If STRIG(n) is specified, event trapping is suspended for the specified button. Further joystick button events are remembered and trapped, in order, after the next STRIG(n) statement is used.
DO PRINT "."; _LIMIT 30 LOOP UNTIL INKEY$ <> "" END 10 a$ = "[STRIG 0 EVENT]" FOR...NEXT x = 1 TO LEN(a$) PRINT MID$(a$, x, 1); _DELAY 0.02 NEXT RETURN '' '' |
- ON STRIG(n) (event statement)
- STRIG, STICK (functions)
- Single and Dual Stick Controllers
Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page