From 1bb602516465746b26a1847fc5094c97642d67f6 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 6 Jun 2018 14:02:42 +0300 Subject: [PATCH] Corrige draw.py --- ISN/pygame/draw.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ISN/pygame/draw.py b/ISN/pygame/draw.py index d5510bd..ac37c95 100644 --- a/ISN/pygame/draw.py +++ b/ISN/pygame/draw.py @@ -33,17 +33,18 @@ while running: pygame.draw.ellipse(windowSurface, RED, (300, 250, 40,80), 1) - pygame.draw.rect(windowSurface, color_border, - (text_rect.left - 20, text_rect.top - 20, - text_rect.width + 40, text_rect.height + 40) - ) - basic_font = pygame.font.SysFont(None, 48) text = basic_font.render('Hello world!', True, color_text ,BLUE) text_rect = text.get_rect() text_rect.centerx = windowSurface.get_rect().centerx text_rect.centery = windowSurface.get_rect().centery + pygame.draw.rect(windowSurface, color_border, + (text_rect.left - 20, text_rect.top - 20, + text_rect.width + 40, text_rect.height + 40) + ) + + windowSurface.blit(text, text_rect) pygame.display.update()