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
Currently the API provides us with button statuses only (is it pressed or is it released). The demo game scrolly-tile does some bitfield magic to keep track of what is actually done with the buttons - and not just if it is held or not.
Currently the API provides us with button statuses only (is it pressed or is it released). The demo game scrolly-tile does some bitfield magic to keep track of what is actually done with the buttons - and not just if it is held or not.
Relevant code:
It would be great if this same functionality would be part of the engine.
Instead of just
blit::buttons
it could be a struct of some kind, where you would have three members:status
- to check the status of a single button, like what blit::buttons is now.pressed
- that would tell which button was pressed since last timereleased
- that would tell which button was released since last timeALthough it might be a little bit long to write, it would increase clarity.
For example:
if ( blit::buttons::pressed & blit::button::A )
The text was updated successfully, but these errors were encountered: