X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fgraphics.py;h=8d95db8c74223249cb2cafa074378cd5a1ee3534;hp=041b137fd9cafc7d42f93d27f5b37aed7622b1ed;hb=5287b4f869be70ddae4b59a44c448be33f95ccda;hpb=885bbd068df051d7b920d6a8a9faa2f74c48db57 diff --git a/qchess/src/graphics.py b/qchess/src/graphics.py index 041b137..8d95db8 100644 --- a/qchess/src/graphics.py +++ b/qchess/src/graphics.py @@ -59,7 +59,7 @@ class GraphicsThread(StoppableThread): pygame.display.flip() for event in pygame.event.get(): - if event.type == pygame.QUIT: + if event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_q): if isinstance(game, GameThread): with game.lock: game.final_result = ""