Add comments in UiImage.py
This commit is contained in:
parent
786db30b58
commit
b606124d38
@ -3,7 +3,14 @@ import pygame
|
||||
|
||||
|
||||
class UiImage(UiElement):
|
||||
image: pygame.Surface
|
||||
|
||||
def __init__(self, rect: pygame.Rect, image: pygame.Surface):
|
||||
"""
|
||||
Creates UiImage object.
|
||||
:param rect: Rectangle on which image will be displayed
|
||||
:param image: Image to display
|
||||
"""
|
||||
super().__init__(rect)
|
||||
self.image = pygame.transform.scale(image, (rect.width, rect.height))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user