Skip to content
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.

Commit

Permalink
add position icons #21 @Cozy61
Browse files Browse the repository at this point in the history
  • Loading branch information
3ximus committed Oct 12, 2021
1 parent 3b79748 commit 61f3921
Show file tree
Hide file tree
Showing 99 changed files with 87 additions and 174 deletions.
174 changes: 87 additions & 87 deletions apps/python/F12020Leaderboard/constants.py
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
import ac

APP_NAME = "F12020Leaderboard"

class FC:
APP_NAME = APP_NAME
FONT_NAME = "Formula"

# IMAGES

# POSITION NUMBERS
LEADERBOARD_POSITION_LABEL = ["apps/python/%s/ui/positions/%d.png" % (APP_NAME, n) for n in range(21)]
LEADERBOARD_POSITION_RED_LABEL = ["apps/python/%s/ui/positions/%d_red.png" % (APP_NAME, n) for n in range(21)]
LEADERBOARD_POSITION_GREEN_LABEL = ["apps/python/%s/ui/positions/%d_green.png" % (APP_NAME, n) for n in range(21)]

# LEADERBOARD BACKGROUNDS
LEADERBOARD_BACKGROUND = "apps/python/%s/ui/background.png" % APP_NAME
LEADERBOARD_BASE_RACE = "apps/python/%s/ui/race_base.png" % APP_NAME
LEADERBOARD_BASE_QUALI = "apps/python/%s/ui/quali_base.png" % APP_NAME
LEADERBOARD_BASE_PRACTICE = "apps/python/%s/ui/practice_base.png" % APP_NAME
LEADERBOARD_FINAL_LAP = "apps/python/%s/ui/final_lap.png" % APP_NAME
LEADERBOARD_INFO_BACKGROUNG = "apps/python/%s/ui/background_info.png" % APP_NAME
LEADERBOARD_PLAYER_HIGHLIGHT = "apps/python/%s/ui/highlight.png" % APP_NAME

# FASTEST LAP
LEADERBOARD_FASTEST_LAP = "apps/python/%s/ui/fastest_lap.png" % APP_NAME
FASTEST_LAP_BANNER = "apps/python/%s/ui/fastest_lap_banner.png" % APP_NAME

# DRIVER WIDGET BACKGROUND
DRIVER_WIDGET_BACKGROUND = "apps/python/%s/ui/driver_widget_background.png" % APP_NAME
DRIVER_WIDGET_BACKGROUND_ALTERNATE = "apps/python/%s/ui/driver_widget_background_alternate.png" % APP_NAME
DRIVER_WIDGET_EXTENDED_BACKGROUND = "apps/python/%s/ui/driver_widget_extended_background.png" % APP_NAME

# FLAGS
YELLOW_FLAG = "apps/python/%s/ui/yellow_flag.png" % APP_NAME
BLUE_FLAG = "apps/python/%s/ui/blue_flag.png" % APP_NAME
YELLOW_FLAG_SECTOR1 = "apps/python/%s/ui/yellow_flag_s1.png" % APP_NAME
YELLOW_FLAG_SECTOR2 = "apps/python/%s/ui/yellow_flag_s2.png" % APP_NAME
YELLOW_FLAG_SECTOR3 = "apps/python/%s/ui/yellow_flag_s3.png" % APP_NAME
# GREEN_FLAG = "apps/python/%s/ui/green_flag.png" % APP_NAME
CHECKERED_FLAG = "apps/python/%s/ui/race_flag.png" % APP_NAME

# POSITION CHANGED INDICATOR
POSITION_GAINED = "apps/python/%s/ui/position_gained.png" % APP_NAME
POSITION_LOST = "apps/python/%s/ui/position_lost.png" % APP_NAME
POSITION_MAINTAINED = "apps/python/%s/ui/position_maintained.png" % APP_NAME

# MISCELANEOUS
ROLEX_LOGO = "apps/python/%s/ui/rolex.png" % APP_NAME
SPEEDOMETER_ICON = "apps/python/%s/ui/icon.png" % APP_NAME
GAPS = "apps/python/%s/ui/gaps.png" % APP_NAME

TYRE_DIR = "apps/python/%s/ui/tyres/" % APP_NAME

# REPLAY DIRECTORY
REPLAY_DIR = "apps/python/%s/replays/" % APP_NAME

# CONSTANTS
OVERTAKE_POSITION_LABEL_TIMER = 3 # seconds
FASTEST_LAP_DISPLAY_TIME = 8
FASTEST_LAP_STARTING_LAP = 2
TRACK_SECTION_LENGTH = 110

TEAM_COLORS = None
TEAM_NAME = None
DRIVER_NUMBER = None
NUMBER_TAGS = None
CARS = None

try:
if not FC.TEAM_COLORS:
FC.TEAM_COLORS = {}
FC.TEAM_NAME = {}
FC.DRIVER_NUMBER = {}
FC.NUMBER_TAGS = {}
FC.CARS = {}
with open("apps/python/%s/teams.ini" % APP_NAME) as fp:
for line in fp:
line = line.split(":")
name = line[-1][:-1]
FC.TEAM_NAME[name] = line[0]
FC.TEAM_COLORS[name] = "apps/python/%s/ui/teams/%s.png" % (APP_NAME, line[1])
FC.CARS[name] = "apps/python/%s/ui/cars/%s.png" % (APP_NAME, line[1])
FC.DRIVER_NUMBER[name] = line[2]
FC.NUMBER_TAGS[name] = "apps/python/%s/ui/numbers/%s.png" % (APP_NAME, line[2])
except FileNotFoundError:
ac.log("File teams.ini not found.")
import ac

APP_NAME = "F12020Leaderboard"

class FC:
APP_NAME = APP_NAME
FONT_NAME = "Formula"

# IMAGES

# POSITION NUMBERS
LEADERBOARD_POSITION_LABEL = ["apps/python/%s/ui/positions/%d.png" % (APP_NAME, n) for n in range(33)]
LEADERBOARD_POSITION_RED_LABEL = ["apps/python/%s/ui/positions/%d_red.png" % (APP_NAME, n) for n in range(33)]
LEADERBOARD_POSITION_GREEN_LABEL = ["apps/python/%s/ui/positions/%d_green.png" % (APP_NAME, n) for n in range(33)]

# LEADERBOARD BACKGROUNDS
LEADERBOARD_BACKGROUND = "apps/python/%s/ui/background.png" % APP_NAME
LEADERBOARD_BASE_RACE = "apps/python/%s/ui/race_base.png" % APP_NAME
LEADERBOARD_BASE_QUALI = "apps/python/%s/ui/quali_base.png" % APP_NAME
LEADERBOARD_BASE_PRACTICE = "apps/python/%s/ui/practice_base.png" % APP_NAME
LEADERBOARD_FINAL_LAP = "apps/python/%s/ui/final_lap.png" % APP_NAME
LEADERBOARD_INFO_BACKGROUNG = "apps/python/%s/ui/background_info.png" % APP_NAME
LEADERBOARD_PLAYER_HIGHLIGHT = "apps/python/%s/ui/highlight.png" % APP_NAME

# FASTEST LAP
LEADERBOARD_FASTEST_LAP = "apps/python/%s/ui/fastest_lap.png" % APP_NAME
FASTEST_LAP_BANNER = "apps/python/%s/ui/fastest_lap_banner.png" % APP_NAME

# DRIVER WIDGET BACKGROUND
DRIVER_WIDGET_BACKGROUND = "apps/python/%s/ui/driver_widget_background.png" % APP_NAME
DRIVER_WIDGET_BACKGROUND_ALTERNATE = "apps/python/%s/ui/driver_widget_background_alternate.png" % APP_NAME
DRIVER_WIDGET_EXTENDED_BACKGROUND = "apps/python/%s/ui/driver_widget_extended_background.png" % APP_NAME

# FLAGS
YELLOW_FLAG = "apps/python/%s/ui/yellow_flag.png" % APP_NAME
BLUE_FLAG = "apps/python/%s/ui/blue_flag.png" % APP_NAME
YELLOW_FLAG_SECTOR1 = "apps/python/%s/ui/yellow_flag_s1.png" % APP_NAME
YELLOW_FLAG_SECTOR2 = "apps/python/%s/ui/yellow_flag_s2.png" % APP_NAME
YELLOW_FLAG_SECTOR3 = "apps/python/%s/ui/yellow_flag_s3.png" % APP_NAME
# GREEN_FLAG = "apps/python/%s/ui/green_flag.png" % APP_NAME
CHECKERED_FLAG = "apps/python/%s/ui/race_flag.png" % APP_NAME

# POSITION CHANGED INDICATOR
POSITION_GAINED = "apps/python/%s/ui/position_gained.png" % APP_NAME
POSITION_LOST = "apps/python/%s/ui/position_lost.png" % APP_NAME
POSITION_MAINTAINED = "apps/python/%s/ui/position_maintained.png" % APP_NAME

# MISCELANEOUS
ROLEX_LOGO = "apps/python/%s/ui/rolex.png" % APP_NAME
SPEEDOMETER_ICON = "apps/python/%s/ui/icon.png" % APP_NAME
GAPS = "apps/python/%s/ui/gaps.png" % APP_NAME

TYRE_DIR = "apps/python/%s/ui/tyres/" % APP_NAME

# REPLAY DIRECTORY
REPLAY_DIR = "apps/python/%s/replays/" % APP_NAME

# CONSTANTS
OVERTAKE_POSITION_LABEL_TIMER = 3 # seconds
FASTEST_LAP_DISPLAY_TIME = 8
FASTEST_LAP_STARTING_LAP = 2
TRACK_SECTION_LENGTH = 110

TEAM_COLORS = None
TEAM_NAME = None
DRIVER_NUMBER = None
NUMBER_TAGS = None
CARS = None

try:
if not FC.TEAM_COLORS:
FC.TEAM_COLORS = {}
FC.TEAM_NAME = {}
FC.DRIVER_NUMBER = {}
FC.NUMBER_TAGS = {}
FC.CARS = {}
with open("apps/python/%s/teams.ini" % APP_NAME) as fp:
for line in fp:
line = line.split(":")
name = line[-1][:-1]
FC.TEAM_NAME[name] = line[0]
FC.TEAM_COLORS[name] = "apps/python/%s/ui/teams/%s.png" % (APP_NAME, line[1])
FC.CARS[name] = "apps/python/%s/ui/cars/%s.png" % (APP_NAME, line[1])
FC.DRIVER_NUMBER[name] = line[2]
FC.NUMBER_TAGS[name] = "apps/python/%s/ui/numbers/%s.png" % (APP_NAME, line[2])
except FileNotFoundError:
ac.log("File teams.ini not found.")
Binary file added apps/python/F12020Leaderboard/ui/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/10_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/10_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/11_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/11_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/12_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/12_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/13_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/13_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/14_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/14_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/15_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/15_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/16_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/16_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/17_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/17_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/python/F12020Leaderboard/ui/18.png
Binary file added apps/python/F12020Leaderboard/ui/18_green.png
Binary file added apps/python/F12020Leaderboard/ui/18_red.png
Binary file added apps/python/F12020Leaderboard/ui/19.png
Binary file added apps/python/F12020Leaderboard/ui/19_green.png
Binary file added apps/python/F12020Leaderboard/ui/19_red.png
Binary file added apps/python/F12020Leaderboard/ui/1_green.png
Binary file added apps/python/F12020Leaderboard/ui/1_red.png
Binary file added apps/python/F12020Leaderboard/ui/2.png
Binary file added apps/python/F12020Leaderboard/ui/20.png
Binary file added apps/python/F12020Leaderboard/ui/20_green.png
Binary file added apps/python/F12020Leaderboard/ui/20_red.png
Binary file added apps/python/F12020Leaderboard/ui/21.png
Binary file added apps/python/F12020Leaderboard/ui/21_green.png
Binary file added apps/python/F12020Leaderboard/ui/21_red.png
Binary file added apps/python/F12020Leaderboard/ui/22.png
Binary file added apps/python/F12020Leaderboard/ui/22_green.png
Binary file added apps/python/F12020Leaderboard/ui/22_red.png
Binary file added apps/python/F12020Leaderboard/ui/23.png
Binary file added apps/python/F12020Leaderboard/ui/23_green.png
Binary file added apps/python/F12020Leaderboard/ui/23_red.png
Binary file added apps/python/F12020Leaderboard/ui/24.png
Binary file added apps/python/F12020Leaderboard/ui/24_green.png
Binary file added apps/python/F12020Leaderboard/ui/24_red.png
Binary file added apps/python/F12020Leaderboard/ui/25.png
Binary file added apps/python/F12020Leaderboard/ui/25_green.png
Binary file added apps/python/F12020Leaderboard/ui/25_red.png
Binary file added apps/python/F12020Leaderboard/ui/26.png
Binary file added apps/python/F12020Leaderboard/ui/26_green.png
Binary file added apps/python/F12020Leaderboard/ui/26_red.png
Binary file added apps/python/F12020Leaderboard/ui/27.png
Binary file added apps/python/F12020Leaderboard/ui/27_green.png
Binary file added apps/python/F12020Leaderboard/ui/27_red.png
Binary file added apps/python/F12020Leaderboard/ui/28.png
Binary file added apps/python/F12020Leaderboard/ui/28_green.png
Binary file added apps/python/F12020Leaderboard/ui/28_red.png
Binary file added apps/python/F12020Leaderboard/ui/29.png
Binary file added apps/python/F12020Leaderboard/ui/29_green.png
Binary file added apps/python/F12020Leaderboard/ui/29_red.png
Binary file added apps/python/F12020Leaderboard/ui/2_green.png
Binary file added apps/python/F12020Leaderboard/ui/2_red.png
Binary file added apps/python/F12020Leaderboard/ui/3.png
Binary file added apps/python/F12020Leaderboard/ui/30.png
Binary file added apps/python/F12020Leaderboard/ui/30_green.png
Binary file added apps/python/F12020Leaderboard/ui/30_red.png
Binary file added apps/python/F12020Leaderboard/ui/31.png
Binary file added apps/python/F12020Leaderboard/ui/31_green.png
Binary file added apps/python/F12020Leaderboard/ui/31_red.png
Binary file added apps/python/F12020Leaderboard/ui/32.png
Binary file added apps/python/F12020Leaderboard/ui/32_green.png
Binary file added apps/python/F12020Leaderboard/ui/32_red.png
Binary file added apps/python/F12020Leaderboard/ui/3_green.png
Binary file added apps/python/F12020Leaderboard/ui/3_red.png
Binary file added apps/python/F12020Leaderboard/ui/4.png
Binary file added apps/python/F12020Leaderboard/ui/4_green.png
Binary file added apps/python/F12020Leaderboard/ui/4_red.png
Binary file added apps/python/F12020Leaderboard/ui/5.png
Binary file added apps/python/F12020Leaderboard/ui/5_green.png
Binary file added apps/python/F12020Leaderboard/ui/5_red.png
Binary file added apps/python/F12020Leaderboard/ui/6.png
Binary file added apps/python/F12020Leaderboard/ui/6_green.png
Binary file added apps/python/F12020Leaderboard/ui/6_red.png
Binary file added apps/python/F12020Leaderboard/ui/7.png
Binary file added apps/python/F12020Leaderboard/ui/7_green.png
Binary file added apps/python/F12020Leaderboard/ui/7_red.png
Binary file added apps/python/F12020Leaderboard/ui/8.png
Binary file added apps/python/F12020Leaderboard/ui/8_green.png
Binary file added apps/python/F12020Leaderboard/ui/8_red.png
Binary file added apps/python/F12020Leaderboard/ui/9.png
Binary file added apps/python/F12020Leaderboard/ui/9_green.png
Binary file added apps/python/F12020Leaderboard/ui/9_red.png
Binary file added apps/python/F12020Leaderboard/ui/number.psd
Diff not rendered.
87 changes: 0 additions & 87 deletions constants.py

This file was deleted.

0 comments on commit 61f3921

Please sign in to comment.