feat: exit on ESC
This commit is contained in:
parent
d0fa03fce4
commit
127e77b190
1 changed files with 4 additions and 0 deletions
4
orao.py
4
orao.py
|
@ -39,6 +39,10 @@ while running:
|
||||||
|
|
||||||
orao_kbd_listener(event, cpu)
|
orao_kbd_listener(event, cpu)
|
||||||
|
|
||||||
|
if event.type in [pygame.KEYDOWN, pygame.KEYUP]:
|
||||||
|
if pygame.key.get_pressed()[pygame.K_ESCAPE]:
|
||||||
|
running = False
|
||||||
|
|
||||||
if event.type == pygame.USEREVENT + 1:
|
if event.type == pygame.USEREVENT + 1:
|
||||||
screen.blit(background, [0, 0])
|
screen.blit(background, [0, 0])
|
||||||
screen.blit(pygame.transform.smoothscale(terminal, (512, 512)), [150, 140])
|
screen.blit(pygame.transform.smoothscale(terminal, (512, 512)), [150, 140])
|
||||||
|
|
Loading…
Reference in a new issue