Input (Getkey ?)

BlitzMax Forums/BlitzMax Beginners Area/Input (Getkey ?)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Another variant...

WaitKeyArray ( [key_left, key_right, key_up, key_down] )
 ' returns true if one of the keys in the array pressed

function KeyHitByArray ( a[] )
 for local b = eachin a
  if keyhit (b) = true then return b
 next
end function

function WaitKeyByArray ( a[] )
 local i = waitkey()
 for local b = eachin a
  if i = b then return b
 next
end function


I don't know if it is of any use...
Ghislain