changed the way the border and logo is drawn to be on every screen
This commit is contained in:
parent
8afb7765a5
commit
bd9ecde8b0
@ -305,12 +305,14 @@ def enter_name():
|
||||
|
||||
screen.blit(highscore_surface, highscore_rectangle)
|
||||
|
||||
|
||||
textbox_surface = pygame_font_2.render('Enter name: ' + str(name), True, pygame_font_main_color)
|
||||
textbox_rectangle = textbox_surface.get_rect()
|
||||
textbox_rectangle.topleft = (700, 350)
|
||||
screen.blit(textbox_surface, textbox_rectangle)
|
||||
draw_border()
|
||||
draw_logos()
|
||||
pygame.display.flip()
|
||||
|
||||
for event in pygame.event.get():
|
||||
if len(name) < max_name_length:
|
||||
if event.type == KEYDOWN:
|
||||
@ -371,6 +373,15 @@ def check_highscores(time):
|
||||
else:
|
||||
return
|
||||
|
||||
def draw_border():
|
||||
# draw logos
|
||||
screen.blit(img_itlablogo_image, (screen_size_x-img_itlablogo_imagex-20, screen_size_y-img_itlablogo_imagey-20))
|
||||
# TODO: Metallic Logo
|
||||
|
||||
def draw_logos():
|
||||
# draw rectangle border around everything
|
||||
pygame.draw.rect(screen,pygame_color_black, (500, 200, (screen_size_x-500*2), (screen_size_y-200*2)), 5)
|
||||
|
||||
def show_debug():
|
||||
print('#############')
|
||||
print('Game running: ' + str(game_running))
|
||||
@ -439,13 +450,6 @@ while True:
|
||||
handle_events()
|
||||
show_debug()
|
||||
|
||||
# draw logos
|
||||
screen.blit(img_itlablogo_image, (screen_size_x-img_itlablogo_imagex-20, screen_size_y-img_itlablogo_imagey-20))
|
||||
# TODO: Metallic Logo
|
||||
|
||||
# draw rectangle border around everything
|
||||
pygame.draw.rect(screen,pygame_color_black, (500, 200, (screen_size_x-500*2), (screen_size_y-200*2)), 5)
|
||||
|
||||
if game_running == False and game_ending == False:
|
||||
# one shot for changing the led colour
|
||||
if game_just_started == True:
|
||||
@ -619,6 +623,10 @@ while True:
|
||||
# this state is never supposed to be reached
|
||||
pass
|
||||
|
||||
# overlaying structure - this is to be drawn no matter what's below
|
||||
draw_border()
|
||||
draw_logos()
|
||||
|
||||
pygame.display.flip()
|
||||
pygame.display.update()
|
||||
pygame_clock.tick(pygame_fps)
|
||||
|
Loading…
Reference in New Issue
Block a user