Procházet zdrojové kódy

(Jan 2022) Update for Jan 2022 - FIFA 99

Now has OS-detecting code so I don't have to keep futzing in Windows

Rejigged display code as FIFA99 has quite a few international teams (43
I think?)
jan-2022
bertieb před 2 roky
rodič
revize
c95cc92a36
3 změnil soubory, kde provedl 62 přidání a 37 odebrání
  1. +4
    -4
      subs.txt
  2. +15
    -7
      teampicker.py
  3. +43
    -26
      teams.txt

+ 4
- 4
subs.txt Zobrazit soubor

@@ -1,8 +1,8 @@
idiotictendencies
etho8282
ksyme99
costello_
burgiuk
rarestmonkey
maothecat
idiotictendencies
mattgamerguy666
pandacat42
mattgamerguy666
nightmarewolf3113

+ 15
- 7
teampicker.py Zobrazit soubor

@@ -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 = []


+ 43
- 26
teams.txt Zobrazit soubor

@@ -1,26 +1,43 @@
Anaheim Mighty Ducks
Boston Bruins
Buffalo Sabres
Calgary Flames
Chicago Blackhawks
Dallas Stars
Detroit Red Wings
Edmonton Oilers
Florida Panthers
Hartford Whalers
Los Angeles Kings
Montreal Canadiens
New Jersey Devils
New York Islanders
New York Rangers
Ottawa Senators
Philadelphia Flyers
Pittsburgh Penguins
Quebec Nordiques
San Jose Sharks
St. Louis Blues
Tampa Bay Lightning
Toronto Maple Leafs
Vancouver Canucks
Washington Capitals
Winnipeg Jets
China PR
Iran
Japan
Saudi Arabia
South Korea
Cameroon
Morocco
Nigeria
South Africa
Tunisia
Canada
Jamaica
Mexico
United States
Argentina
Brazil
Chile
Colombia
Paraguay
Uruguay
Australia
Austria
Belgium
Bulgaria
Croatia
Czech Republic
Denmark
England
France
Germany
Greece
Ireland
Israel
Italy
Netherlands
Norway
Portugal
Romania
Russia
Scotland
Spain
Sweden
Yugoslavia

Načítá se…
Zrušit
Uložit