diff --git a/BlankProjectTemplate/src/Gameplay.py b/BlankProjectTemplate/src/Gameplay.py index 7ec8dc5fb76bb3a7fea54694436409852ffdd629..26896d83b37acf5a81088f640b45cc9f626da5d4 100644 --- a/BlankProjectTemplate/src/Gameplay.py +++ b/BlankProjectTemplate/src/Gameplay.py @@ -115,7 +115,7 @@ def game(speed, colour,food_colour, backgroundColour): win.fill(backgroundColour) - sc_color = [0,0,0] if backgroundColour == [255,255,255] else [255,255,255] + sc_color = [0,0,0] if backgroundColour[0] == 255 else [255,255,255] font = pygame.font.Font("Roboto-Light.ttf",30) text = font.render(" " + str(score),True,sc_color) win.blit(text,(0,0)) diff --git a/BlankProjectTemplate/src/highscore.py b/BlankProjectTemplate/src/highscore.py index a77a783649def585d30fb0b2510f2633c60d83d7..70d65ce7ff381e1a1a576ad0981bd78e6b3d5fc9 100644 --- a/BlankProjectTemplate/src/highscore.py +++ b/BlankProjectTemplate/src/highscore.py @@ -64,23 +64,25 @@ class HighScore(): def main(): pygame.init() red = [255,0,0] + white = (255,255,255) + black = (48,47,47) while True: mousepos = pygame.mouse.get_pos() #checking mouse position mouseclick = pygame.mouse.get_pressed()#checking mouse pressed highscore = pygame.display.set_mode((300, 150)) - #highscore.fill([213, 219, 219]) + highscore.fill(white) pygame.display.set_caption("Highscore") - HighScore.text('Highest Score: ' + str(HighScore.findHighScore()),"comicsansms", 30,[0, 0, 200],(10,20),highscore) + HighScore.custom_text('Highest Score: ' + str(HighScore.findHighScore()),"Roboto-Light.ttf", 30,black,(10,20),highscore) - HighScore.button(highscore,[0,0,0], [90,70,120,26], 0) - HighScore.text('Main Menu',"times", 25,red,(90,70),highscore) +## HighScore.button(highscore,[0,0,0], [90,70,120,26], 0) + HighScore.custom_text('Main Menu',"Roboto-Light.ttf", 25,black,(90,70),highscore) if (90 <= mousepos[0] <= 90+120 and 70 <= mousepos[1] <= 70+27 ): if mouseclick[0] == 1: Interface.main() - HighScore.button(highscore,[0,0,0], [125,105,45,27], 0) - HighScore.text('Quit',"times", 25,red,(125,105),highscore) +## HighScore.button(highscore,[0,0,0], [125,105,45,27], 0) + HighScore.custom_text('Quit',"Roboto-Light.ttf", 25,black,(125,105),highscore) if (125 <= mousepos[0] <= 125+45 and 105 <= mousepos[1] <= 105+27 ): if mouseclick[0] == 1: pygame.quit()