changed the way the drawing for the name entry works

This commit is contained in:
Patrick Tschuchnig 2019-09-11 14:24:18 +02:00
parent bd9ecde8b0
commit 003ccce40f

View File

@ -301,16 +301,24 @@ def enter_name():
highscore_surface = pygame_font_1.render('High Score!', True, pygame_font_main_color) highscore_surface = pygame_font_1.render('High Score!', True, pygame_font_main_color)
highscore_rectangle = highscore_surface.get_rect() highscore_rectangle = highscore_surface.get_rect()
highscore_rectangle.topleft = (700, 210) highscore_rectangle.topleft = (700, 250)
screen.blit(highscore_surface, highscore_rectangle) screen.blit(highscore_surface, highscore_rectangle)
textbox_surface = pygame_font_2.render('Enter name: ' + str(name), True, pygame_font_main_color) textbox_text_surface = pygame_font_2.render('Enter Name:',True, pygame_font_main_color)
textbox_text_rectangle = textbox_surface.get_rect()
textbox_text_rectangle.topleft = (700, 400)
textbox_surface = pygame_font_2.render(str(name), True, pygame_font_main_color)
textbox_rectangle = textbox_surface.get_rect() textbox_rectangle = textbox_surface.get_rect()
textbox_rectangle.topleft = (700, 350) textbox_rectangle.topleft = (700, 370)
screen.blit(textbox_text_surface, textbox_text_rectangle)
screen.blit(textbox_surface, textbox_rectangle) screen.blit(textbox_surface, textbox_rectangle)
draw_border() draw_border()
draw_logos() draw_logos()
pygame.display.flip() pygame.display.flip()
for event in pygame.event.get(): for event in pygame.event.get():