-
Notifications
You must be signed in to change notification settings - Fork 0
Buttons
Boyney edited this page Feb 6, 2023
·
2 revisions
When you need to access the buttons on the Sprig, it's actually very easy. Remember, the button are laid own in a WASD and IJKL format, so it would look something like this:
W |--------| I
A D | SCREEN | J L
S |--------| K
With that in mind, you only use one function for the buttons: spryg.get_button.
This takes one argument that's the button ID, which is the letter name of one of the buttons. It returns a boolean that represents whether the button is currently pressed down. Very simple.
Some example usage:
game.py
def run(spryg):
print(sprig.get_button("W"))