Skip to content
Snippets Groups Projects
Commit f3830207 authored by Hameed Andy's avatar Hameed Andy
Browse files

completed majority of theme modifications

parent b4f1644c
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment