Add UiImage class

This commit is contained in:
Michał Czekański 2020-04-04 00:35:07 +02:00
parent bb29d0cd1f
commit ed1d057be2

View File

@ -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))