diff --git a/classes.py b/classes.py index 311fec3..fba9775 100644 --- a/classes.py +++ b/classes.py @@ -1,10 +1,41 @@ import pygame pygame.font.init() -font = pygame.font.Font('fonts/medieval.ttf', 48) +fonts = { + 'medieval': 'medieval.ttf', + 'minecraft': 'Minecraft Evenings.otf', + '3dpixel': '3D-Pixel.ttf', + '8bit': '8bitlim.ttf', + '8bito': '8blimro.ttf', + 'arcade': 'ARCADECLASSIC.ttf', + 'modern_game': 'astron boy video.otf', + 'modern': 'astron boy.otf', + 'wonder': 'Beyond Wonderland.ttf', + 'curved': 'Digitag.ttf', + 'simple': 'DisposableDroidBB.ttf', + 'rounded': 'dpcomic.ttf', + 'playfull': 'Endalian Script.ttf', + 'blocky': 'FREAKSOFNATURE.ttf', + 'catchy': 'Future TimeSplitters.otf', + 'simple_wide': 'Halo3.ttf', + 'simple_fat': 'INVASION2000.ttf', + 'very_gamy': 'ka1.ttf', + 'simple_round': 'Karma Suture.otf', + 'mono': 'manaspc.ttf', + 'damaged': 'Merchant Copy.ttf', + 'big_natural': 'MorialCitadel.TTF', + 'spacy': 'nasalization-rg.otf', + 'sci-fi': 'neuropol.otf', + 'hollow_big_edge': 'papercut.ttf', + 'space_shuttle': 'pdark.ttf', + 'thin': 'PixelFJVerdana12pt.ttf', + 'random': 'Seattle Avenue.ttf', + 'pixel': 'yoster.ttf' +} class Button(): - def __init__(self, x, y, width, height, buttonText='Button', onclickFunction=None, onePress=False): + def __init__(self, x, y, width, height, font, buttonText='Button', onclickFunction=None, onePress=False): + font = pygame.font.Font(f'fonts/{fonts[font]}', 48) self.x = x self.y = y self.width = width diff --git a/fonts/3D-Pixel.ttf b/fonts/3D-Pixel.ttf new file mode 100644 index 0000000..15a051c Binary files /dev/null and b/fonts/3D-Pixel.ttf differ diff --git a/fonts/8bitlim.ttf b/fonts/8bitlim.ttf new file mode 100644 index 0000000..f8051e4 Binary files /dev/null and b/fonts/8bitlim.ttf differ diff --git a/fonts/8bitlimo.ttf b/fonts/8bitlimo.ttf new file mode 100644 index 0000000..fbd4d88 Binary files /dev/null and b/fonts/8bitlimo.ttf differ diff --git a/fonts/8bitlimr.ttf b/fonts/8bitlimr.ttf new file mode 100644 index 0000000..c66935d Binary files /dev/null and b/fonts/8bitlimr.ttf differ diff --git a/fonts/8blimro.ttf b/fonts/8blimro.ttf new file mode 100644 index 0000000..1f9da76 Binary files /dev/null and b/fonts/8blimro.ttf differ diff --git a/fonts/ARCADECLASSIC.TTF b/fonts/ARCADECLASSIC.TTF new file mode 100644 index 0000000..394a9f7 Binary files /dev/null and b/fonts/ARCADECLASSIC.TTF differ diff --git a/fonts/Beyond Wonderland.ttf b/fonts/Beyond Wonderland.ttf new file mode 100644 index 0000000..8cf093b Binary files /dev/null and b/fonts/Beyond Wonderland.ttf differ diff --git a/fonts/Digitag.ttf b/fonts/Digitag.ttf new file mode 100644 index 0000000..ea523e9 Binary files /dev/null and b/fonts/Digitag.ttf differ diff --git a/fonts/DisposableDroidBB.ttf b/fonts/DisposableDroidBB.ttf new file mode 100644 index 0000000..84f98c5 Binary files /dev/null and b/fonts/DisposableDroidBB.ttf differ diff --git a/fonts/DisposableDroidBB_bld.ttf b/fonts/DisposableDroidBB_bld.ttf new file mode 100644 index 0000000..9748e29 Binary files /dev/null and b/fonts/DisposableDroidBB_bld.ttf differ diff --git a/fonts/DisposableDroidBB_bldital.ttf b/fonts/DisposableDroidBB_bldital.ttf new file mode 100644 index 0000000..5544fe4 Binary files /dev/null and b/fonts/DisposableDroidBB_bldital.ttf differ diff --git a/fonts/DisposableDroidBB_ital.ttf b/fonts/DisposableDroidBB_ital.ttf new file mode 100644 index 0000000..596d523 Binary files /dev/null and b/fonts/DisposableDroidBB_ital.ttf differ diff --git a/fonts/Endalian Script.ttf b/fonts/Endalian Script.ttf new file mode 100644 index 0000000..1304f00 Binary files /dev/null and b/fonts/Endalian Script.ttf differ diff --git a/fonts/FREAKSOFNATURE.ttf b/fonts/FREAKSOFNATURE.ttf new file mode 100644 index 0000000..335c851 Binary files /dev/null and b/fonts/FREAKSOFNATURE.ttf differ diff --git a/fonts/FREAKSOFNATUREMASSIVE.ttf b/fonts/FREAKSOFNATUREMASSIVE.ttf new file mode 100644 index 0000000..f9b49d8 Binary files /dev/null and b/fonts/FREAKSOFNATUREMASSIVE.ttf differ diff --git a/fonts/Future TimeSplitters.otf b/fonts/Future TimeSplitters.otf new file mode 100644 index 0000000..f28a9a9 Binary files /dev/null and b/fonts/Future TimeSplitters.otf differ diff --git a/fonts/Halo3.ttf b/fonts/Halo3.ttf new file mode 100644 index 0000000..daeb3f2 Binary files /dev/null and b/fonts/Halo3.ttf differ diff --git a/fonts/INVASION2000.TTF b/fonts/INVASION2000.TTF new file mode 100644 index 0000000..87f629b Binary files /dev/null and b/fonts/INVASION2000.TTF differ diff --git a/fonts/Karma Future.otf b/fonts/Karma Future.otf new file mode 100644 index 0000000..c05849b Binary files /dev/null and b/fonts/Karma Future.otf differ diff --git a/fonts/Karma Suture.otf b/fonts/Karma Suture.otf new file mode 100644 index 0000000..31279ea Binary files /dev/null and b/fonts/Karma Suture.otf differ diff --git a/fonts/Merchant Copy Doublesize.ttf b/fonts/Merchant Copy Doublesize.ttf new file mode 100644 index 0000000..6651f4b Binary files /dev/null and b/fonts/Merchant Copy Doublesize.ttf differ diff --git a/fonts/Merchant Copy Wide.ttf b/fonts/Merchant Copy Wide.ttf new file mode 100644 index 0000000..74527d2 Binary files /dev/null and b/fonts/Merchant Copy Wide.ttf differ diff --git a/fonts/Merchant Copy.ttf b/fonts/Merchant Copy.ttf new file mode 100644 index 0000000..a095272 Binary files /dev/null and b/fonts/Merchant Copy.ttf differ diff --git a/fonts/Minecraft Evenings.otf b/fonts/Minecraft Evenings.otf new file mode 100644 index 0000000..ada43f1 Binary files /dev/null and b/fonts/Minecraft Evenings.otf differ diff --git a/fonts/MoriaCitadel.TTF b/fonts/MoriaCitadel.TTF new file mode 100644 index 0000000..7a63981 Binary files /dev/null and b/fonts/MoriaCitadel.TTF differ diff --git a/fonts/PixelFJVerdana12pt.ttf b/fonts/PixelFJVerdana12pt.ttf new file mode 100644 index 0000000..5531267 Binary files /dev/null and b/fonts/PixelFJVerdana12pt.ttf differ diff --git a/fonts/Seattle Avenue.ttf b/fonts/Seattle Avenue.ttf new file mode 100644 index 0000000..21f3099 Binary files /dev/null and b/fonts/Seattle Avenue.ttf differ diff --git a/fonts/SeattleAvenue.otf b/fonts/SeattleAvenue.otf new file mode 100644 index 0000000..57f51c1 Binary files /dev/null and b/fonts/SeattleAvenue.otf differ diff --git a/fonts/astron boy italic.otf b/fonts/astron boy italic.otf new file mode 100644 index 0000000..25f5c1f Binary files /dev/null and b/fonts/astron boy italic.otf differ diff --git a/fonts/astron boy video.otf b/fonts/astron boy video.otf new file mode 100644 index 0000000..78a3c9d Binary files /dev/null and b/fonts/astron boy video.otf differ diff --git a/fonts/astron boy wonder.otf b/fonts/astron boy wonder.otf new file mode 100644 index 0000000..72c7e49 Binary files /dev/null and b/fonts/astron boy wonder.otf differ diff --git a/fonts/astron boy.otf b/fonts/astron boy.otf new file mode 100644 index 0000000..d27810f Binary files /dev/null and b/fonts/astron boy.otf differ diff --git a/fonts/dpcomic.ttf b/fonts/dpcomic.ttf new file mode 100644 index 0000000..a0776ae Binary files /dev/null and b/fonts/dpcomic.ttf differ diff --git a/fonts/ka1.ttf b/fonts/ka1.ttf new file mode 100644 index 0000000..d1df852 Binary files /dev/null and b/fonts/ka1.ttf differ diff --git a/fonts/kirbyss.ttf b/fonts/kirbyss.ttf new file mode 100644 index 0000000..018853f Binary files /dev/null and b/fonts/kirbyss.ttf differ diff --git a/fonts/manaspc.ttf b/fonts/manaspc.ttf new file mode 100644 index 0000000..0c56733 Binary files /dev/null and b/fonts/manaspc.ttf differ diff --git a/fonts/nasalization-rg.otf b/fonts/nasalization-rg.otf new file mode 100644 index 0000000..ce4625f Binary files /dev/null and b/fonts/nasalization-rg.otf differ diff --git a/fonts/neuropol.otf b/fonts/neuropol.otf new file mode 100644 index 0000000..5732517 Binary files /dev/null and b/fonts/neuropol.otf differ diff --git a/fonts/papercut.ttf b/fonts/papercut.ttf new file mode 100644 index 0000000..4f47ef4 Binary files /dev/null and b/fonts/papercut.ttf differ diff --git a/fonts/pcsenior.ttf b/fonts/pcsenior.ttf new file mode 100644 index 0000000..0bb46c4 Binary files /dev/null and b/fonts/pcsenior.ttf differ diff --git a/fonts/pdark.ttf b/fonts/pdark.ttf new file mode 100644 index 0000000..0eace6e Binary files /dev/null and b/fonts/pdark.ttf differ diff --git a/fonts/yoster.ttf b/fonts/yoster.ttf new file mode 100644 index 0000000..bbbeb51 Binary files /dev/null and b/fonts/yoster.ttf differ diff --git a/main.py b/main.py index b8d191e..d68cad2 100644 --- a/main.py +++ b/main.py @@ -31,9 +31,9 @@ def main(): config = readConfig() screen, clock, running, isblack, background, objects = setUp(config["screen"]) WIDTH, HEIGHT = screen.get_size() - objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2 + 72, 160, 64, "Exit game", quitGame)) - objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2, 160, 64, "Options", uwu)) - objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2 - 72, 160, 64, "Play", uwu)) + objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2 + 72, 160, 64, 'medieval', "Exit game", quitGame)) + objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2, 160, 64, 'medieval', "Options", uwu)) + objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2 - 72, 160, 64, 'medieval', "Play", uwu)) print(objects) while running: