From e8a961cdddbe238dde5c67e463114578f35b197b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sat, 4 Apr 2020 18:40:56 +0200 Subject: [PATCH] Fix generating UiConsole image --- src/ui/UiConsole.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/UiConsole.py b/src/ui/UiConsole.py index 1834252..afca695 100644 --- a/src/ui/UiConsole.py +++ b/src/ui/UiConsole.py @@ -4,9 +4,9 @@ from src.ui.UiElement import UiElement class UiConsole(UiElement): - def __init__(self, rect, bgColor=(125, 125, 125)): + def __init__(self, rect: pygame.Rect, bgColor=(125, 125, 125)): super().__init__(rect) self.bgColor = bgColor - self.image = pygame.Surface(rect) + self.image = pygame.Surface((rect.width, rect.height)) self.image.fill(bgColor)