diff --git a/gametest_rev2.py b/gametest_rev2.py index 82df16d..ec70b0a 100644 --- a/gametest_rev2.py +++ b/gametest_rev2.py @@ -117,9 +117,9 @@ Circuit diagrams for the contact and button electronics: All buttons are close-contact. -+3.3V DC ---+-----------+--------------------------------> ++3.3V DC ---+-----------+-----------+-----------+--------> | | | | - R2 R4 R4 R4 + R2 R4 R6 R8 | | | | +----+ +----+ +----+ +----+ | | | | | | | | @@ -438,8 +438,9 @@ def change_led_colour(red_amount, green_amount, blue_amount): return True def clear_screen(): - """fills the screen with a colour""" + """fills the screen with a colour and draws the background""" screen.fill(pygame_color_white) + draw_background() def handle_events(): """looks for things to do every tick""" @@ -579,6 +580,10 @@ def check_highscores(time): else: return False +def draw_background(): + """draw background image""" + screen.blit(img_background_image, (0,0)) + def draw_border(): """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) @@ -635,6 +640,11 @@ img_metalliclogo_image = pygame.image.load(img_metalliclogo) img_metalliclogo_imagex = get_image_width(img_metalliclogo) img_metalliclogo_imagey = get_image_height(img_metalliclogo) +img_background = 'img/bg.png' +img_background_image = pygame.image.load(img_background) +img_background_imagex = get_image_width(img_background) +img_background_imagey = get_image_height(img_background) + # initialise led strip led_init() diff --git a/img/bg.png b/img/bg.png new file mode 100644 index 0000000..a8e7e6f Binary files /dev/null and b/img/bg.png differ diff --git a/img/metalliclogo.png b/img/metalliclogo.png index 0e6e933..4b0470f 100644 Binary files a/img/metalliclogo.png and b/img/metalliclogo.png differ