You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the keyboard input API I decided to expose both the physical key (keycode), and logical (scancode) enums.
This allows the user to specify what kind of key they wish to poll, a physical key for game input, or a local key that uses the local keyboard mapping.
This does double up the keyboard API, does that feel acceptable?
RL_API bool rlIsPhysicalKeyDown(RLKeyboardPhysicalKey key);
RL_API bool rlIsPhysicalKeyUp(RLKeyboardPhysicalKey key);
RL_API bool rlIsPhysicalKeyPressed(RLKeyboardPhysicalKey key);
RL_API bool rlIsPhysicalKeyReleased(RLKeyboardPhysicalKey key);
RL_API bool rlIsLogicalKeyDown(RLKeyboardLogicalKey key);
RL_API bool rlIsLogicalKeyUp(RLKeyboardLogicalKey key);
RL_API bool rlIsLogicalKeyPressed(RLKeyboardLogicalKey key);
RL_API bool rlIsLogicalKeyReleased(RLKeyboardLogicalKey key);
```
For the key events functions, I made the read functions non destructive, you are given a count and must use a for loop to pull out the events. This makes it very easy to check if any key was pressed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For the keyboard input API I decided to expose both the physical key (keycode), and logical (scancode) enums.
This allows the user to specify what kind of key they wish to poll, a physical key for game input, or a local key that uses the local keyboard mapping.
This does double up the keyboard API, does that feel acceptable?
Beta Was this translation helpful? Give feedback.
All reactions