Add comments in UiImage.py
This commit is contained in:
parent
08643c7083
commit
aab779d4e1
@ -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