|
|
@@ -19,6 +19,7 @@ |
|
|
|
import sys |
|
|
|
import random |
|
|
|
import pygame |
|
|
|
import platform |
|
|
|
|
|
|
|
pygame.init() |
|
|
|
random.seed("bertiebdec2021") |
|
|
@@ -31,9 +32,16 @@ SIZE = WIDTH, HEIGHT = 1920, 1080 |
|
|
|
|
|
|
|
BGIMG = pygame.image.load("sub_crown_bg_2.png") |
|
|
|
|
|
|
|
FONT = pygame.font.SysFont("Fetamont", 40) |
|
|
|
SUBFONTHEIGHT = 45 |
|
|
|
SUBFONT = pygame.font.SysFont("Fetamont", SUBFONTHEIGHT) |
|
|
|
FONTHEIGHT = 35 |
|
|
|
SUBFONTHEIGHT = 40 |
|
|
|
|
|
|
|
if "Windows" not in platform.system(): |
|
|
|
SUBFONT = pygame.font.SysFont("Fetamont", SUBFONTHEIGHT) |
|
|
|
FONT = pygame.font.SysFont("Fetamont", FONTHEIGHT) |
|
|
|
else: |
|
|
|
SUBFONT = pygame.font.Font("ffmb10.ttf", SUBFONTHEIGHT) |
|
|
|
FONT = pygame.font.Font("ffmb10.ttf", FONTHEIGHT) |
|
|
|
|
|
|
|
OFFWHITE = (224, 224, 224) |
|
|
|
HIGHLIGHT = (255, 209, 0) |
|
|
|
BLUE = (20, 25, 153) |
|
|
@@ -41,7 +49,7 @@ RED = (186, 20, 31) |
|
|
|
PURPLE = (121, 35, 158) |
|
|
|
|
|
|
|
screen = pygame.display.set_mode(SIZE) |
|
|
|
pygame.display.set_caption("Sub Crown October 2021 Team Picker") |
|
|
|
pygame.display.set_caption("Sub Crown January 2022 Team Picker") |
|
|
|
|
|
|
|
# Set up team text positioning references |
|
|
|
# |
|
|
@@ -49,8 +57,8 @@ pygame.display.set_caption("Sub Crown October 2021 Team Picker") |
|
|
|
|
|
|
|
TEAMSFILE = "teams.txt" |
|
|
|
|
|
|
|
TEAMNUMCOLS = 2 |
|
|
|
TEAMNUMROWS = 18 |
|
|
|
TEAMNUMCOLS = 3 |
|
|
|
TEAMNUMROWS = 15 |
|
|
|
|
|
|
|
# COLSTART = int(WIDTH/TEAMNUMCOLS) |
|
|
|
COLSTART = int(WIDTH/(TEAMNUMCOLS+1)) |
|
|
@@ -58,7 +66,7 @@ COLWIDTH = int((WIDTH-COLSTART)/TEAMNUMCOLS) |
|
|
|
|
|
|
|
ROWSTART = int(HEIGHT/(TEAMNUMROWS+2)) |
|
|
|
# ROWHEIGHT = int((HEIGHT-ROWSTART)/TEAMNUMROWS) |
|
|
|
ROWHEIGHT = int((HEIGHT-ROWSTART)/(TEAMNUMROWS-5)) |
|
|
|
ROWHEIGHT = int((HEIGHT-ROWSTART)/(TEAMNUMROWS+0)) |
|
|
|
|
|
|
|
TEAMCOLS = [] |
|
|
|
TEAMROWS = [] |
|
|
|