Infobildschirm vor countdown entfernt (hat die Leute zu sehr verwirrt)
This commit is contained in:
parent
ce71c6803d
commit
f8bcda88f7
54
photobox.py
54
photobox.py
@ -122,33 +122,31 @@ screen = pygame.display.set_mode((WIDTH,HEIGHT))
|
|||||||
|
|
||||||
|
|
||||||
# LOAD OVERLAYS
|
# LOAD OVERLAYS
|
||||||
loading = pygame.image.load(GRAPHICS_DIR + "/loading.png")
|
begin = pygame.image.load(GRAPHICS_DIR + "/begin.png")
|
||||||
|
begin_rect = begin.get_rect()
|
||||||
|
|
||||||
|
loading = pygame.image.load(GRAPHICS_DIR + "/loading.png")
|
||||||
loading_rect = loading.get_rect()
|
loading_rect = loading.get_rect()
|
||||||
|
|
||||||
begin = pygame.image.load(GRAPHICS_DIR + "/begin.png")
|
yes = pygame.image.load(GRAPHICS_DIR + "/yes.png")
|
||||||
begin_rect = begin.get_rect()
|
|
||||||
|
|
||||||
yes = pygame.image.load(GRAPHICS_DIR + "/yes.png")
|
|
||||||
yes_rect = yes.get_rect()
|
yes_rect = yes.get_rect()
|
||||||
yes_rect.y = 340
|
yes_rect.y = 340
|
||||||
|
|
||||||
no = pygame.image.load(GRAPHICS_DIR + "/no.png")
|
no = pygame.image.load(GRAPHICS_DIR + "/no.png")
|
||||||
no_rect = no.get_rect()
|
no_rect = no.get_rect()
|
||||||
no_rect.y = 340
|
no_rect.y = 340
|
||||||
|
|
||||||
end_yes = pygame.image.load(GRAPHICS_DIR + "/end_yes.png")
|
end_yes = pygame.image.load(GRAPHICS_DIR + "/end_yes.png")
|
||||||
end_yes_rect = end_yes.get_rect()
|
end_yes_rect = end_yes.get_rect()
|
||||||
|
|
||||||
end_no = pygame.image.load(GRAPHICS_DIR + "/end_no.png")
|
end_no = pygame.image.load(GRAPHICS_DIR + "/end_no.png")
|
||||||
end_no_rect = end_no.get_rect()
|
end_no_rect = end_no.get_rect()
|
||||||
|
|
||||||
saved = pygame.image.load(GRAPHICS_DIR + "/saved.png")
|
saved = pygame.image.load(GRAPHICS_DIR + "/saved.png")
|
||||||
saved_rect = saved.get_rect()
|
saved_rect = saved.get_rect()
|
||||||
|
|
||||||
canceled = pygame.image.load(GRAPHICS_DIR + "/canceled.png")
|
canceled = pygame.image.load(GRAPHICS_DIR + "/canceled.png")
|
||||||
canceled_rect = canceled.get_rect()
|
canceled_rect = canceled.get_rect()
|
||||||
|
|
||||||
#~ img_info = Image.open(GRAPHICS_DIR + '/info.png')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -167,16 +165,6 @@ for i in range(0, COUNTDOWN):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# LOAD INFORMATION OVERLAY
|
|
||||||
img_info = Image.open(GRAPHICS_DIR + '/info.png')
|
|
||||||
pad_info = Image.new('RGB', (
|
|
||||||
((img_info.size[0] + 31) // 32) * 32,
|
|
||||||
((img_info.size[1] + 15) // 16) * 16,
|
|
||||||
))
|
|
||||||
pad_info.paste(img_info, (0, 0))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# FUNCTIONS ========================================================================================
|
# FUNCTIONS ========================================================================================
|
||||||
|
|
||||||
def waitForEvent():
|
def waitForEvent():
|
||||||
@ -252,15 +240,7 @@ def makePhotos():
|
|||||||
camera.hflip = True
|
camera.hflip = True
|
||||||
camera.resolution = (2592, 1944)
|
camera.resolution = (2592, 1944)
|
||||||
camera.rotation = 90
|
camera.rotation = 90
|
||||||
|
|
||||||
# PREVIEW
|
|
||||||
camera.start_preview()
|
camera.start_preview()
|
||||||
o = camera.add_overlay(pad_info.tostring(), size=img_info.size)
|
|
||||||
o.alpha = 255
|
|
||||||
o.layer = 3
|
|
||||||
sleep(3)
|
|
||||||
camera.remove_overlay(o)
|
|
||||||
sleep(1)
|
|
||||||
|
|
||||||
# COUNTDOWN
|
# COUNTDOWN
|
||||||
GPIO.output(7, GPIO.HIGH)
|
GPIO.output(7, GPIO.HIGH)
|
||||||
@ -303,8 +283,8 @@ def chooseImages():
|
|||||||
choices = []
|
choices = []
|
||||||
x = 12
|
x = 12
|
||||||
for i in range(0, SHOT_COUNT):
|
for i in range(0, SHOT_COUNT):
|
||||||
img = pygame.image.load("tmp%s.jpg" % i)
|
img = pygame.image.load("tmp%s.jpg" % i)
|
||||||
img = pygame.transform.scale(img, (THUMB_WIDTH, THUMB_HEIGHT))
|
img = pygame.transform.scale(img, (THUMB_WIDTH, THUMB_HEIGHT))
|
||||||
rect = img.get_rect()
|
rect = img.get_rect()
|
||||||
rect.x = x
|
rect.x = x
|
||||||
rect.y = 146
|
rect.y = 146
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user