-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|341|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Text and GUI's


 
Teasy
Created : 21 August 2007
 
Language : Blitz

Interface re-handler

Encapsulates Blitz' native input routines for keyboard, mouse and joystick, enabling multi-point input polling.

This system allows you to poll keys and buttons on multiple points in a program, without the need to store it in a variable, as the system does this for you when you call the UpdateInput function.
The only difference is that you can use KeyHit[ Key_Esc ] using square brackets rather than braces.

List of available arrays and functions:
- Main System
Global KeyDown[ 255 ]
Global KeyHit [ 255 ]
Global MouseDown[ 255 ]
Global MouseHit [ 255 ]
Global JoyDown[ 255 ]
Global JoyHit [ 255 ]
Global ShiftDown,ControlDown,AltDown
Global ShiftHit ,ControlHit ,AltHit
Global CtrlDown
Function UpdateInput()

- Single-point input poll functions
Function MouseUp( Button )
Function JoyUp( Button )
Function KeyUp( Key )

- Library test function
Function TestInputs()

- Other Functions
Function waitkeyordelay( time=0 )
Function AnyKeyDown% ()
Function AnyKeyHit% ()
Function FlushInput( AutoOnly = False )


 

Comments