Files

44 lines
1.0 KiB
Python

import pygame
import os
import sys
# settings.py
# Screen dimensions
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
FPS = 60
# Colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
ORANGE = (255, 165, 0)
PURPLE = (128, 0, 128)
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
# Fonts
pygame.font.init()
FONT_MD = pygame.font.Font(resource_path("Assets/fonts/DotGothic16-Regular.ttf"), 24)
FONT_LG = pygame.font.Font(resource_path("Assets/fonts/DotGothic16-Regular.ttf"), 48)
# Wario's Opposites Attack!
WARIO_BG_COLOR = BLACK
WARIO_SUCCESS_COLOR = (255, 255, 0) # Yellow
# 9-Volt's Retro Reload
NINEVOLT_BG_COLOR = (20, 20, 20)
NINEVOLT_SUCCESS_COLOR = (0, 255, 255) # Cyan