keycounter
This commit is contained in:
parent
401201aba3
commit
c1d072e173
1 changed files with 28 additions and 23 deletions
5
main.py
5
main.py
|
@ -110,11 +110,16 @@ buttonhovered = [False, False, False, False, False, False]
|
||||||
buttons_to_render = 6 # button begrenzung
|
buttons_to_render = 6 # button begrenzung
|
||||||
dropdown = True
|
dropdown = True
|
||||||
before_buttonhovered = False
|
before_buttonhovered = False
|
||||||
|
key_counter = 0
|
||||||
|
pressed_keys = pygame.key.get_pressed()
|
||||||
show_debug = False
|
show_debug = False
|
||||||
running = True
|
running = True
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
while running:
|
while running:
|
||||||
## key managment
|
## key managment
|
||||||
|
key_counter += 1
|
||||||
|
if key_counter == 5:
|
||||||
|
key_counter = 0
|
||||||
pressed_keys = pygame.key.get_pressed()
|
pressed_keys = pygame.key.get_pressed()
|
||||||
if True in pressed_keys:
|
if True in pressed_keys:
|
||||||
if pressed_keys[pygame.K_ESCAPE]:
|
if pressed_keys[pygame.K_ESCAPE]:
|
||||||
|
|
Loading…
Reference in a new issue