Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_BUTTON
#8
(04-03-2023, 08:40 PM)TerryRitchie Wrote: I found a library called:

' GX - A BASIC Game Engine for QB64
' 2021 boxgaming - https://github.com/boxgaming/gx

that had mapped all the _BUTTON vales to keys in a file called gx.bi. I used that as a basis to create the code below if anyone needs the _BUTTON values for the keyboard.

Yes, that was an interesting exercise.   I wanted to have generic and consistent device detection and input mapping across different types of game device inputs (gamepad, keyboard, mouse) using _DEVICEINPUT.  I also found that _DEVICEINPUT didn't work for keyboard button state on macos so GX has a fallback for that OS to use _keydown.
Reply


Messages In This Thread
_BUTTON - by TerryRitchie - 04-03-2023, 02:42 AM
RE: _BUTTON - by TerryRitchie - 04-03-2023, 08:40 PM
RE: _BUTTON - by dbox - 04-03-2023, 11:07 PM
RE: _BUTTON - by TerryRitchie - 04-04-2023, 02:25 AM
RE: _BUTTON - by dbox - 04-04-2023, 03:34 AM
RE: _BUTTON - by SMcNeill - 04-03-2023, 09:03 PM
RE: _BUTTON - by TerryRitchie - 04-03-2023, 09:16 PM
RE: _BUTTON - by SMcNeill - 04-03-2023, 09:04 PM
RE: _BUTTON - by TerryRitchie - 04-03-2023, 09:26 PM
RE: _BUTTON - by RhoSigma - 04-03-2023, 10:03 PM
RE: _BUTTON - by TerryRitchie - 04-04-2023, 02:24 AM
RE: _BUTTON - by TerryRitchie - 04-09-2023, 01:17 AM
RE: _BUTTON - by SMcNeill - 04-09-2023, 03:46 AM
RE: _BUTTON - by TerryRitchie - 04-09-2023, 05:12 AM



Users browsing this thread: 2 Guest(s)