summaryrefslogtreecommitdiff
path: root/gui.py
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-25 19:49:46 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-25 19:49:46 +0200
commit0df1c5f7799fdd63c3cd3fdc92bc9ccc60d1da8f (patch)
tree6d5eb1af94357640bc12c94d2694d912fa01d281 /gui.py
parent8386ae0e63313ffc5d0fefebda8451d982679e01 (diff)
clean quit
Diffstat (limited to 'gui.py')
-rw-r--r--gui.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gui.py b/gui.py
index 57b08c5..895b1ac 100644
--- a/gui.py
+++ b/gui.py
@@ -8,6 +8,8 @@ import math
import time
from agarnet.agarnet.vec import Vec
+running = True
+
font_fallback = False
try:
from pygame import freetype
@@ -272,7 +274,7 @@ def draw_markers():
draw_marker(marker[i], colors[i], marker_updated[i])
def draw_frame():
- global screen, movement, zoom, screensize, input, bot_input, marker, marker_updated
+ global screen, movement, zoom, screensize, input, bot_input, marker, marker_updated, running
pygame.event.pump()
clock.tick()
@@ -328,7 +330,7 @@ def draw_frame():
input = False
bot_input = True
if event.key == K_ESCAPE:
- pygame.quit()
+ running = False
if event.key == K_r:
c.send_respawn()
if event.type == MOUSEBUTTONDOWN: