-
Notifications
You must be signed in to change notification settings - Fork 0
/
dvdLoadingScreen.py
36 lines (28 loc) · 976 Bytes
/
dvdLoadingScreen.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Name: DVD Loading Screen
# Contributors: Adam Douglas
# Date: 28-06-2016
# Purpose: Use the pygame module to emulate a DVD loading screen, where the
# logo bounces off the walls and moves around the screen.
import pygame
import animationFunctions as af
from settings import Settings
from logo import Logo
def runLoadingScreen():
# Initialize the window to display the screen on
pygame.init()
dvdSettings = Settings()
screen = pygame.display.set_mode(
(dvdSettings.screenWidth, dvdSettings.screenHeight))
pygame.display.set_caption("DVD Loading Screen")
# Set a background color
bgColor = dvdSettings.bgColor
# Create an instance of the image
logo = Logo(dvdSettings, screen)
# Set the mouse to be invisible
pygame.mouse.set_visible(False)
running = True
while running:
af.checkEvents()
logo.update(dvdSettings)
af.updateScreen(screen, dvdSettings, logo)
runLoadingScreen()