show idl qr only if Event.gallery

This commit is contained in:
Patrick Haßel 2025-06-28 08:53:18 +02:00
parent 374a583c37
commit 11701f58b8
2 changed files with 7 additions and 3 deletions

View File

@ -232,9 +232,12 @@ class Fotobox:
def _draw(self):
screen.fill((0, 0, 0))
if self._state == State.IDLE:
if self._event is not None and self._event.gallery:
screen.blit(FOTOBOX_TITLE_SURFACE, FOTOBOX_TITLE_RECT)
screen.blit(self._idle_qr, self._idle_qr_rect)
screen.blit(self._idle_url, self._idle_url_rect)
else:
screen.blit(FOTOBOX_TITLE_SURFACE, FOTOBOX_TITLE_RECT_CENTER)
elif self._state == State.COUNTDOWN:
self._draw_live_frame()
if self._countdown_timer.rest() == 3:

View File

@ -58,6 +58,7 @@ DOMAIN = "fotobox.online"
FONT_TITLE = pygame.font.SysFont(None, 70)
FOTOBOX_TITLE_SURFACE = FONT_TITLE.render("Berühren um Fotos zu schießen", True, (255, 255, 255))
FOTOBOX_TITLE_RECT = FOTOBOX_TITLE_SURFACE.get_rect(centerx=SCREEN_RECT.centerx, top=BORDER)
FOTOBOX_TITLE_RECT_CENTER = FOTOBOX_TITLE_SURFACE.get_rect(center=SCREEN_RECT.center)
FONT_URL = pygame.font.SysFont(None, 60)