corrected font config
This commit is contained in:
parent
e8e93ec91e
commit
d90c6379c8
14
gametest.py
14
gametest.py
@ -33,7 +33,7 @@ grayColor = pygame.Color(128, 128, 128)
|
||||
mainFontColor = redColor
|
||||
|
||||
#fonts
|
||||
font = pygame.font.Font('freesansbold.ttf', 90)
|
||||
font1 = pygame.font.Font('freesansbold.ttf', 90)
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
print('Programm exiting')
|
||||
@ -152,11 +152,11 @@ while True: # main loop
|
||||
time_rectangle = 0
|
||||
errors_rectangle = 0
|
||||
|
||||
header_surface = font.render('Dr' + u'ü' + 'cken Sie Start!', True, mainFontColor)
|
||||
header_surface = font1.render('Dr' + u'ü' + 'cken Sie Start!', True, mainFontColor)
|
||||
header_rectangle = header_surface.get_rect()
|
||||
header_rectangle.topleft = (10, 100)
|
||||
|
||||
highscore_header_surface = font.render('Highscores:', True, mainFontColor)
|
||||
highscore_header_surface = font1.render('Highscores:', True, mainFontColor)
|
||||
highscore_header_rectangle = highscore_header_surface.get_rect()
|
||||
highscore_header_rectangle = (10,190)
|
||||
|
||||
@ -187,7 +187,7 @@ while True: # main loop
|
||||
|
||||
#justStarted = True
|
||||
|
||||
header_surface = font.render('Spiel l' + u'ä' + 'uft!', True, mainFontColor)
|
||||
header_surface = font1.render('Spiel l' + u'ä' + 'uft!', True, mainFontColor)
|
||||
time.sleep(5)
|
||||
|
||||
start_time = int(time.time())
|
||||
@ -207,11 +207,11 @@ while True: # main loop
|
||||
|
||||
int_time = int(time.time()) - start_time
|
||||
|
||||
time_surface = font.render('Zeit: ' + str(int_time) + 's', True, mainFontColor)
|
||||
time_surface = font1.render('Zeit: ' + str(int_time) + 's', True, mainFontColor)
|
||||
time_rectangle = time_surface.get_rect()
|
||||
time_rectangle.topleft = (10, 300)
|
||||
|
||||
errors_surface = font.render('Fehler: ' + str(errors), True, mainFontColor)
|
||||
errors_surface = font1.render('Fehler: ' + str(errors), True, mainFontColor)
|
||||
errors_rectangle = errors_surface.get_rect()
|
||||
errors_rectangle.topleft = (10, 400)
|
||||
|
||||
@ -230,7 +230,7 @@ while True: # main loop
|
||||
print("Game ended because start pin wasnt true")
|
||||
|
||||
clearScreen()
|
||||
header_surface = font.render('Game over!', True, mainFontColor)
|
||||
header_surface = font1.render('Game over!', True, mainFontColor)
|
||||
|
||||
screen.blit(errors_surface, errors_rectangle) #errors
|
||||
screen.blit(time_surface, time_rectangle) #time
|
||||
|
Loading…
Reference in New Issue
Block a user