From 6f405b1c516e08767bc66cfadd079f140464bbfc Mon Sep 17 00:00:00 2001 From: skymike03 Date: Sun, 6 Jul 2025 21:47:06 +0200 Subject: [PATCH] Suppression des rectangles de fond noir des popups et warnings dans display.py --- display.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/display.py b/display.py index b6a55f9..ca016f4 100644 --- a/display.py +++ b/display.py @@ -13,8 +13,13 @@ OVERLAY.fill((0, 0, 0, 180)) def init_display(): """Initialise l’écran Pygame.""" screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) + config.screen_width, config.screen_height = screen.get_size() + # Redimensionner l'overlay pour correspondre à la résolution réelle + global OVERLAY + OVERLAY = pygame.Surface((config.screen_width, config.screen_height), pygame.SRCALPHA) + OVERLAY.fill((0, 0, 0, 180)) return screen - + def draw_gradient(screen, top_color, bottom_color): """Dessine un fond dégradé vertical.""" height = screen.get_height()