Création d'un dossier photo, crétation d'un dossier comportant les image des boutons multimedia. Changement des logos pour play et pause et ajout des logo next et previous.
3
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
10
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
4
.idea/misc.xml
generated
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
|
||||
</project>
|
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/slideshow.iml" filepath="$PROJECT_DIR$/.idea/slideshow.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
8
.idea/slideshow.iml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
1
Logos/lien logos.txt
Normal file
@ -0,0 +1 @@
|
||||
https://www.flaticon.com/packs/music-player
|
BIN
Logos/next.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Logos/pause.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
Logos/play.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
Logos/previous.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Logos/shuffle.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
35
main.py
@ -6,9 +6,9 @@ import threading
|
||||
# import exifread
|
||||
|
||||
# Chemin du dossier contenant les photos
|
||||
PHOTO_FOLDER = "C:/Users/archa/OneDrive/Pictures/test"
|
||||
PHOTO_FOLDER = "./photos"
|
||||
# Temps affichage photos (1000 = 1 seconde)
|
||||
TIMER = 5000
|
||||
TIMER = 8000
|
||||
|
||||
|
||||
# Liste des fichiers dans le dossier
|
||||
@ -56,12 +56,25 @@ def load_photos():
|
||||
|
||||
threading.Thread(target=load_photos, daemon=True).start()
|
||||
|
||||
# Création du logo de pause
|
||||
pause_logo = pygame.image.load("pause_logo.png")
|
||||
# Logos Play, Pause, Next, Previous
|
||||
LOGO_SIZE = (200, 200)
|
||||
|
||||
pause_logo = pygame.image.load("./Logos/pause.png")
|
||||
pause_logo = pygame.transform.smoothscale(pause_logo, LOGO_SIZE)
|
||||
pause_logo_rect = pause_logo.get_rect(center=screen.get_rect().center)
|
||||
play_logo = pygame.image.load("play_logo.png")
|
||||
|
||||
play_logo = pygame.image.load("./Logos/play.png")
|
||||
play_logo = pygame.transform.smoothscale(play_logo, LOGO_SIZE)
|
||||
play_logo_rect = play_logo.get_rect(center=screen.get_rect().center)
|
||||
|
||||
next_logo = pygame.image.load("./Logos/next.png")
|
||||
next_logo = pygame.transform.smoothscale(next_logo, LOGO_SIZE)
|
||||
next_logo_rect = next_logo.get_rect(midright=(screen.get_rect().right - 50, screen.get_rect().centery))
|
||||
|
||||
previous_logo = pygame.image.load("./Logos/previous.png")
|
||||
previous_logo = pygame.transform.smoothscale(previous_logo, LOGO_SIZE)
|
||||
previous_logo_rect = previous_logo.get_rect(midleft=(screen.get_rect().left + 50, screen.get_rect().centery))
|
||||
|
||||
while running:
|
||||
# Gestion des événements
|
||||
for event in pygame.event.get():
|
||||
@ -72,13 +85,25 @@ while running:
|
||||
if not auto_change:
|
||||
screen.blit(pause_logo, pause_logo_rect)
|
||||
pygame.display.flip()
|
||||
pygame.time.delay(1000) # Pause de 1 secondes avant de masquer le logo
|
||||
screen.fill((0, 0, 0))
|
||||
else:
|
||||
screen.blit(play_logo, play_logo_rect)
|
||||
pygame.display.flip()
|
||||
pygame.time.delay(1000) # Pause de 1 secondes avant de masquer le logo
|
||||
screen.fill((0, 0, 0))
|
||||
elif event.type == KEYDOWN and event.key == K_LEFT:
|
||||
photo_index = (photo_index - 1) % len(photo_files)
|
||||
screen.blit(previous_logo, previous_logo_rect)
|
||||
pygame.display.flip()
|
||||
pygame.time.delay(1000) # Pause de 1 secondes avant de masquer le logo
|
||||
screen.fill((0, 0, 0))
|
||||
elif event.type == KEYDOWN and event.key == K_RIGHT:
|
||||
photo_index = (photo_index + 1) % len(photo_files)
|
||||
screen.blit(next_logo, next_logo_rect)
|
||||
pygame.display.flip()
|
||||
pygame.time.delay(1000) # Pause de 1 secondes avant de masquer le logo
|
||||
screen.fill((0, 0, 0))
|
||||
elif event.type == KEYDOWN and event.key == K_f:
|
||||
fullscreen = not fullscreen
|
||||
if fullscreen:
|
||||
|
BIN
photos/christopher-burns-C1J_eSGNPt0-unsplash.jpg
Executable file
After Width: | Height: | Size: 7.1 MiB |
BIN
photos/luca-bravo-zAjdgNXsMeg.jpg
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
photos/paul-pastourmatzis-Ph-zKEr_Wx4.jpg
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
photos/pawel-czerwinski-E2tGOeS4Ijc.jpg
Normal file
After Width: | Height: | Size: 2.1 MiB |