def recognize_slide(word, size=100): screen.fill(background_color) p = screen.get_rect().center draw_text(word, p, size=size) draw_text("1=unknown", (200, SCREEN_HEIGHT-100), size=50) draw_text("4=recognized", (SCREEN_WIDTH-250, SCREEN_HEIGHT-100), size=50) pygame.display.flip()
def draw_focus_screen(): p = screen.get_rect().center draw_text('+', p, size=100)
def simple_slide(text, size=100): screen.fill(background_color) p = screen.get_rect().center draw_text(text, p, size=size) pygame.display.flip()
from focus import * import time HOME_FOLDER = os.environ['homepath'] dx = dy = 0 xback = 0 yback = 0 run = False dash = False real = focus() screen_rect = screen.get_rect() camera = screen_rect.copy() frame = 0 #starting the loop while True: frame += 1 clock.tick(30) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() elif event.type == KEYDOWN and event.key == K_q: pygame.quit() sys.exit() elif event.type == KEYDOWN and event.key == K_UP: