diff --git a/src/ui/UiImage.py b/src/ui/UiImage.py index d8cd485..6dbb5fc 100644 --- a/src/ui/UiImage.py +++ b/src/ui/UiImage.py @@ -1,5 +1,10 @@ -import src.ui.UiElement as UiElement +from src.ui.UiElement import UiElement +import pygame class UiImage(UiElement): - pass + def __init__(self, rect: pygame.Rect, image: pygame.Surface): + super().__init__(rect) + self.image = pygame.transform.scale(image, (rect.width, rect.height)) + +