diff --git a/main.py b/main.py index d123ce7..0f08bff 100644 --- a/main.py +++ b/main.py @@ -536,6 +536,7 @@ def album_creation(y): mouse_clicked = pygame.mouse.get_pressed()[0] keys = pygame.key.get_pressed() if (user_text and mouse_clicked) or (user_text and keys[pygame.K_RETURN]): + user_text = user_text.strip() if user_text not in storage["albums"]: storage["albums"][user_text] = {} with open(DATA_FILE, 'w') as data_file: @@ -1313,8 +1314,6 @@ while run: user_text = user_text[0:-1] elif len(user_text) < 15: user_text += event.unicode - elif event.key == pygame.K_RETURN: - user_text = user_text.strip() if current_mode == "game": if timer_running: