forked from nouha-belka/Dijkstra-Bellman-implementation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreen.py
More file actions
32 lines (25 loc) · 665 Bytes
/
Copy pathscreen.py
File metadata and controls
32 lines (25 loc) · 665 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
import pygame
import os
class Screen():
def __init__(self,title,width,height,fill,x,y):
self.title = title
self.width = width
self.height = height
self.fill = fill
self.current = False
self.x = x
self.y = y
self.position = self.x, self.y
def make_current(self):
pygame.display.set_caption(self.title)
self.current = True
self.screen = pygame.display.set_mode((self.width,self.height))
def end_current(self):
self.current = False
def check_update(self):
return self.current
def screen_update(self):
if(self.current):
self.screen.fill(self.fill)
def return_title(self):
return self.screen