-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
se comentó pygame para evitar warnings en test
- Loading branch information
1 parent
8b0fa1d
commit fbfe143
Showing
2 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
import os | ||
import pygame | ||
import time | ||
# import os | ||
# import pygame | ||
# import time | ||
|
||
|
||
def show_initial_image(): | ||
# Path of the image I want to display | ||
image_path = "./app/resources/stay_away.png" | ||
# def show_initial_image(): | ||
# # Path of the image I want to display | ||
# image_path = "./app/resources/stay_away.png" | ||
|
||
# Path of the audio file | ||
audio_path = "./app/resources/stay_away.mp3" | ||
# # Path of the audio file | ||
# audio_path = "./app/resources/stay_away.mp3" | ||
|
||
# pygame configuration | ||
pygame.init() | ||
window = pygame.display.set_mode((400, 300), pygame.NOFRAME) | ||
# # pygame configuration | ||
# pygame.init() | ||
# window = pygame.display.set_mode((400, 300), pygame.NOFRAME) | ||
|
||
# Load the image | ||
image = pygame.image.load(image_path) | ||
# # Load the image | ||
# image = pygame.image.load(image_path) | ||
|
||
# Get the width and height of the window | ||
window_width, window_height = window.get_size() | ||
# # Get the width and height of the window | ||
# window_width, window_height = window.get_size() | ||
|
||
# Scale the image to the size of the window | ||
image = pygame.transform.scale(image, (window_width, window_height)) | ||
# # Scale the image to the size of the window | ||
# image = pygame.transform.scale(image, (window_width, window_height)) | ||
|
||
# Show the image in the window | ||
window.blit(image, (0, 0)) | ||
pygame.display.flip() | ||
# # Show the image in the window | ||
# window.blit(image, (0, 0)) | ||
# pygame.display.flip() | ||
|
||
# Play audio file | ||
pygame.mixer.init() | ||
pygame.mixer.music.load(audio_path) | ||
pygame.mixer.music.play() | ||
# # Play audio file | ||
# pygame.mixer.init() | ||
# pygame.mixer.music.load(audio_path) | ||
# pygame.mixer.music.play() | ||
|
||
# Wait 6 seconds | ||
time.sleep(6) | ||
# # Wait 6 seconds | ||
# time.sleep(6) | ||
|
||
# Close the window | ||
pygame.quit() | ||
# # Close the window | ||
# pygame.quit() |