diff --git a/PyGame/Calculator/calc.py b/PyGame/Calculator/calc.py new file mode 100644 index 0000000..0cb418d --- /dev/null +++ b/PyGame/Calculator/calc.py @@ -0,0 +1,34 @@ +import os +os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" +import pygame +import sys + +pygame.init() + +width = 600 +height = 900 + +screen = pygame.display.set_mode((width, height)) +pygame.display.set_caption('CheesyCalc') +icon = pygame.image.load(os.path.join("img", "cheesy_icon_32x32.png")) +icon.convert_alpha() +pygame.display.set_icon(icon) +logo = pygame.image.load(os.path.join("img", "cheesy.png")) +logo.convert_alpha() +screen.blit(logo, (30, 20)) +cheesy_font = pygame.font.Font(os.path.join("font", "Cheese.ttf"), 60) +logo_text_1 = cheesy_font.render("Cheesy", True, (240, 240, 20)) +logo_text_2 = cheesy_font.render("Calculator", True, (240, 240, 20)) +screen.blit(logo_text_1, (width // 2 - logo_text_1.get_width() // 2 + 80, -15)) +screen.blit(logo_text_2, (width // 2 - logo_text_2.get_width() // 2 + 80, 30)) +sevenseg_font = pygame.font.Font(os.path.join("font", "Seven Segment.ttf"), 120) +text = sevenseg_font.render("9378675309", True, (255, 255, 255)) +screen.blit(text, (width // 2 - text.get_width() // 2, 100)) +pygame.draw.rect(screen, (240, 240, 20), pygame.Rect(10, 95, 580, 130), 2) + +while True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + pygame.display.flip() \ No newline at end of file diff --git a/PyGame/Calculator/font/Cheese.ttf b/PyGame/Calculator/font/Cheese.ttf new file mode 100644 index 0000000..da61c31 Binary files /dev/null and b/PyGame/Calculator/font/Cheese.ttf differ diff --git a/PyGame/Calculator/font/Seven Segment.ttf b/PyGame/Calculator/font/Seven Segment.ttf new file mode 100644 index 0000000..214053f Binary files /dev/null and b/PyGame/Calculator/font/Seven Segment.ttf differ diff --git a/PyGame/Calculator/img/cheesy.png b/PyGame/Calculator/img/cheesy.png new file mode 100644 index 0000000..00396bd Binary files /dev/null and b/PyGame/Calculator/img/cheesy.png differ diff --git a/PyGame/Calculator/img/cheesy_icon_32x32.png b/PyGame/Calculator/img/cheesy_icon_32x32.png new file mode 100644 index 0000000..0b433cc Binary files /dev/null and b/PyGame/Calculator/img/cheesy_icon_32x32.png differ