Commit 5b566fbd authored by Jonathan Carter's avatar Jonathan Carter
Browse files

Commit initial project

parents
#!/usr/bin/env python3
import sys
import pygame
import time
pygame.init()
pygame.font.init()
# Some initial variables
# TODO: Get from config file
SCREEN_WIDTH=1600
SCREEN_HEIGHT=900
SCREEN_WIDTH=1024
SCREEN_HEIGHT=768
size = width, height = SCREEN_WIDTH, SCREEN_HEIGHT
speed = [0, 0]
black = 0, 0, 0
grey = 40, 40, 40
# Set up window
pygame.display.set_caption('md5sumchecker')
# Set to pygame.FULLSCREEN for fullscreen
screen = pygame.display.set_mode((size), pygame.NOFRAME)
#screen = pygame.display.set_mode((size), pygame.FULLSCREEN)
screen.fill(grey)
# Load images
usbimg = pygame.image.load('usb.png')
def clear_screen():
screen.fill(grey)
def drawcard_intro():
clear_screen()
pygame.draw.rect(screen, (180, 38, 34), (50, 50, SCREEN_WIDTH-110, 110))
titlefont = pygame.font.SysFont("Cantarell Extra Bold", 120)
label = titlefont.render("AIMS Desktop", 1, (255, 255, 255))
text_rect = label.get_rect(center=(SCREEN_WIDTH/2, 105))
screen.blit(label, text_rect)
textfont = pygame.font.SysFont("Cantarell Bold", 40)
label = textfont.render("This tool will check the integrity of files on this installation media.",
1, (200, 200, 200))
text_rect = label.get_rect(center=(SCREEN_WIDTH/2, 240))
screen.blit(label, text_rect)
textfont = pygame.font.SysFont("Cantarell Bold", 40)
label = textfont.render("To continue press space. To quit press ESC.", 1, (200, 200, 200))
text_rect = label.get_rect(center=(SCREEN_WIDTH/2, 330))
screen.blit(label, text_rect)
img_rect = usbimg.get_rect(center=(SCREEN_WIDTH/2, 500))
screen.blit(usbimg, img_rect)
pygame.display.flip()
def drawcard_offair():
clear_screen()
pygame.draw.rect(screen, (40, 200, 200), (50, 50, 700, 110))
myfont = pygame.font.SysFont("Cantarell Extra Bold", 120)
label = myfont.render("TESTING", 1, (255, 255, 255))
screen.blit(label, (225, 60))
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if (event.key == pygame.K_ESCAPE):
print("Escape pressed, exiting...")
sys.exit()
if event.type == pygame.QUIT:
sys.exit()
drawcard_intro()
usb.png

19.7 KB

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment