Skip to content
Snippets Groups Projects
Commit 6c262b2f authored by moon2's avatar moon2 :speech_balloon:
Browse files

st3m: bugfix Pressable state output

parent bbc19136
No related tags found
No related merge requests found
......@@ -249,14 +249,18 @@ class Pressable:
"""
True if the button is held down, after first being pressed.
"""
return self.state == self.DOWN
return (
(self.state == self.DOWN)
or (self.state == self.PRESSED)
or (self.state == self.REPEATED)
)
@property
def up(self) -> bool:
"""
True if the button is currently not being held down.
"""
return self.state == self.UP
return not self.down
def _ignore_pressed(self) -> None:
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment