keycounter

This commit is contained in:
Michael S. 2024-02-25 11:43:30 +01:00
parent 401201aba3
commit c1d072e173

View file

@ -110,11 +110,16 @@ buttonhovered = [False, False, False, False, False, False]
buttons_to_render = 6 # button begrenzung
dropdown = True
before_buttonhovered = False
key_counter = 0
pressed_keys = pygame.key.get_pressed()
show_debug = False
running = True
if __name__ == "__main__":
while running:
## key managment
key_counter += 1
if key_counter == 5:
key_counter = 0
pressed_keys = pygame.key.get_pressed()
if True in pressed_keys:
if pressed_keys[pygame.K_ESCAPE]: