Compare commits
No commits in common. "main" and "master" have entirely different histories.
6
.idea/.gitignore
generated
vendored
@ -1,3 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
|
10
.idea/inspectionProfiles/Project_Default.xml
generated
@ -1,10 +0,0 @@
|
||||
<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
@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
4
.idea/misc.xml
generated
@ -1,4 +0,0 @@
|
||||
<?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
@ -1,8 +0,0 @@
|
||||
<?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
@ -1,8 +0,0 @@
|
||||
<?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
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1 +0,0 @@
|
||||
https://www.flaticon.com/packs/music-player
|
BIN
Logos/next.png
Before Width: | Height: | Size: 11 KiB |
BIN
Logos/pause.png
Before Width: | Height: | Size: 7.4 KiB |
BIN
Logos/play.png
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.8 KiB |
33
main.py
@ -8,7 +8,7 @@ import threading
|
||||
# Chemin du dossier contenant les photos
|
||||
PHOTO_FOLDER = "./photos"
|
||||
# Temps affichage photos (1000 = 1 seconde)
|
||||
TIMER = 8000
|
||||
TIMER = 5000
|
||||
|
||||
|
||||
# Liste des fichiers dans le dossier
|
||||
@ -56,25 +56,12 @@ def load_photos():
|
||||
|
||||
threading.Thread(target=load_photos, daemon=True).start()
|
||||
|
||||
# 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)
|
||||
# Création du logo de pause
|
||||
pause_logo = pygame.image.load("pause_logo.png")
|
||||
pause_logo_rect = pause_logo.get_rect(center=screen.get_rect().center)
|
||||
|
||||
play_logo = pygame.image.load("./Logos/play.png")
|
||||
play_logo = pygame.transform.smoothscale(play_logo, LOGO_SIZE)
|
||||
play_logo = pygame.image.load("play_logo.png")
|
||||
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():
|
||||
@ -85,25 +72,13 @@ 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:
|
||||
|
0
photos/christopher-burns-C1J_eSGNPt0-unsplash.jpg
Executable file → Normal file
Before Width: | Height: | Size: 7.1 MiB After Width: | Height: | Size: 7.1 MiB |