Merge branch 'master' of http://git.wolfsberg.local/philipp.clima/heisser_draht
This commit is contained in:
commit
2ba3cbc1f4
@ -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()
|
||||
|
||||
|
BIN
img/bg.png
Normal file
BIN
img/bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 354 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 35 KiB |
Loading…
Reference in New Issue
Block a user