Add UiImage class
This commit is contained in:
parent
bb29d0cd1f
commit
ed1d057be2
@ -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))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user