-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindows.py
More file actions
45 lines (35 loc) · 934 Bytes
/
Copy pathWindows.py
File metadata and controls
45 lines (35 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import pygame as pg
class Screen:
def __init__(self):
"""
Set la longueur et la largeur de la fenêtre ainsi que l'écran en instance pygame
"""
self.__screen = pg.display
self.__width = 800
self.__height = 950
@property
def screen(self):
"""
:return: renvoie le screen
"""
return self.__screen
@property
def width(self):
"""
:return: renvoie la valeur de width
"""
return self.__width
@property
def height(self):
"""
:return: renvoie la valeur de height
"""
return self.__height
def set_name(self, title):
"""
:param title : titre de la fenêtre
: return : met le titre à la fenêtre pygame
"""
if type(title) != type('test'):
raise TypeError
return self.screen.set_caption(f"{title}")