diff --git a/apps/python/F12020Leaderboard/constants.py b/apps/python/F12020Leaderboard/constants.py index 4d3c413..6745f2f 100644 --- a/apps/python/F12020Leaderboard/constants.py +++ b/apps/python/F12020Leaderboard/constants.py @@ -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.") diff --git a/apps/python/F12020Leaderboard/ui/1.png b/apps/python/F12020Leaderboard/ui/1.png new file mode 100644 index 0000000..f2b7461 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/1.png differ diff --git a/apps/python/F12020Leaderboard/ui/10.png b/apps/python/F12020Leaderboard/ui/10.png new file mode 100644 index 0000000..47f3139 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/10.png differ diff --git a/apps/python/F12020Leaderboard/ui/10_green.png b/apps/python/F12020Leaderboard/ui/10_green.png new file mode 100644 index 0000000..49227e5 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/10_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/10_red.png b/apps/python/F12020Leaderboard/ui/10_red.png new file mode 100644 index 0000000..ce7e82a Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/10_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/11.png b/apps/python/F12020Leaderboard/ui/11.png new file mode 100644 index 0000000..102e27e Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/11.png differ diff --git a/apps/python/F12020Leaderboard/ui/11_green.png b/apps/python/F12020Leaderboard/ui/11_green.png new file mode 100644 index 0000000..2a88c3c Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/11_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/11_red.png b/apps/python/F12020Leaderboard/ui/11_red.png new file mode 100644 index 0000000..0c08e87 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/11_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/12.png b/apps/python/F12020Leaderboard/ui/12.png new file mode 100644 index 0000000..7ed0022 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/12.png differ diff --git a/apps/python/F12020Leaderboard/ui/12_green.png b/apps/python/F12020Leaderboard/ui/12_green.png new file mode 100644 index 0000000..0fb50e8 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/12_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/12_red.png b/apps/python/F12020Leaderboard/ui/12_red.png new file mode 100644 index 0000000..8e3aac0 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/12_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/13.png b/apps/python/F12020Leaderboard/ui/13.png new file mode 100644 index 0000000..595eb29 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/13.png differ diff --git a/apps/python/F12020Leaderboard/ui/13_green.png b/apps/python/F12020Leaderboard/ui/13_green.png new file mode 100644 index 0000000..26f252d Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/13_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/13_red.png b/apps/python/F12020Leaderboard/ui/13_red.png new file mode 100644 index 0000000..bc046bf Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/13_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/14.png b/apps/python/F12020Leaderboard/ui/14.png new file mode 100644 index 0000000..1174ba8 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/14.png differ diff --git a/apps/python/F12020Leaderboard/ui/14_green.png b/apps/python/F12020Leaderboard/ui/14_green.png new file mode 100644 index 0000000..7b54ee2 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/14_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/14_red.png b/apps/python/F12020Leaderboard/ui/14_red.png new file mode 100644 index 0000000..ade73cf Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/14_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/15.png b/apps/python/F12020Leaderboard/ui/15.png new file mode 100644 index 0000000..ba38723 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/15.png differ diff --git a/apps/python/F12020Leaderboard/ui/15_green.png b/apps/python/F12020Leaderboard/ui/15_green.png new file mode 100644 index 0000000..3bf96d6 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/15_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/15_red.png b/apps/python/F12020Leaderboard/ui/15_red.png new file mode 100644 index 0000000..cc21e15 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/15_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/16.png b/apps/python/F12020Leaderboard/ui/16.png new file mode 100644 index 0000000..af79ac7 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/16.png differ diff --git a/apps/python/F12020Leaderboard/ui/16_green.png b/apps/python/F12020Leaderboard/ui/16_green.png new file mode 100644 index 0000000..5c2918b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/16_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/16_red.png b/apps/python/F12020Leaderboard/ui/16_red.png new file mode 100644 index 0000000..270c413 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/16_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/17.png b/apps/python/F12020Leaderboard/ui/17.png new file mode 100644 index 0000000..2d8e0b8 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/17.png differ diff --git a/apps/python/F12020Leaderboard/ui/17_green.png b/apps/python/F12020Leaderboard/ui/17_green.png new file mode 100644 index 0000000..5d43b77 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/17_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/17_red.png b/apps/python/F12020Leaderboard/ui/17_red.png new file mode 100644 index 0000000..b5ac5a4 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/17_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/18.png b/apps/python/F12020Leaderboard/ui/18.png new file mode 100644 index 0000000..34e9d07 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/18.png differ diff --git a/apps/python/F12020Leaderboard/ui/18_green.png b/apps/python/F12020Leaderboard/ui/18_green.png new file mode 100644 index 0000000..3ecb5ef Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/18_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/18_red.png b/apps/python/F12020Leaderboard/ui/18_red.png new file mode 100644 index 0000000..81b6be4 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/18_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/19.png b/apps/python/F12020Leaderboard/ui/19.png new file mode 100644 index 0000000..a94f0a7 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/19.png differ diff --git a/apps/python/F12020Leaderboard/ui/19_green.png b/apps/python/F12020Leaderboard/ui/19_green.png new file mode 100644 index 0000000..481d191 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/19_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/19_red.png b/apps/python/F12020Leaderboard/ui/19_red.png new file mode 100644 index 0000000..b5750f4 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/19_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/1_green.png b/apps/python/F12020Leaderboard/ui/1_green.png new file mode 100644 index 0000000..3579553 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/1_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/1_red.png b/apps/python/F12020Leaderboard/ui/1_red.png new file mode 100644 index 0000000..29340df Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/1_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/2.png b/apps/python/F12020Leaderboard/ui/2.png new file mode 100644 index 0000000..b5633bc Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/2.png differ diff --git a/apps/python/F12020Leaderboard/ui/20.png b/apps/python/F12020Leaderboard/ui/20.png new file mode 100644 index 0000000..cf92cc5 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/20.png differ diff --git a/apps/python/F12020Leaderboard/ui/20_green.png b/apps/python/F12020Leaderboard/ui/20_green.png new file mode 100644 index 0000000..ac63c88 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/20_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/20_red.png b/apps/python/F12020Leaderboard/ui/20_red.png new file mode 100644 index 0000000..905d9c6 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/20_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/21.png b/apps/python/F12020Leaderboard/ui/21.png new file mode 100644 index 0000000..3b086b3 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/21.png differ diff --git a/apps/python/F12020Leaderboard/ui/21_green.png b/apps/python/F12020Leaderboard/ui/21_green.png new file mode 100644 index 0000000..69f3fbb Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/21_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/21_red.png b/apps/python/F12020Leaderboard/ui/21_red.png new file mode 100644 index 0000000..1d26611 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/21_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/22.png b/apps/python/F12020Leaderboard/ui/22.png new file mode 100644 index 0000000..1b36287 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/22.png differ diff --git a/apps/python/F12020Leaderboard/ui/22_green.png b/apps/python/F12020Leaderboard/ui/22_green.png new file mode 100644 index 0000000..1d9748f Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/22_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/22_red.png b/apps/python/F12020Leaderboard/ui/22_red.png new file mode 100644 index 0000000..8a19e92 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/22_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/23.png b/apps/python/F12020Leaderboard/ui/23.png new file mode 100644 index 0000000..e1a6aff Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/23.png differ diff --git a/apps/python/F12020Leaderboard/ui/23_green.png b/apps/python/F12020Leaderboard/ui/23_green.png new file mode 100644 index 0000000..39b7b9c Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/23_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/23_red.png b/apps/python/F12020Leaderboard/ui/23_red.png new file mode 100644 index 0000000..c76563a Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/23_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/24.png b/apps/python/F12020Leaderboard/ui/24.png new file mode 100644 index 0000000..1289eca Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/24.png differ diff --git a/apps/python/F12020Leaderboard/ui/24_green.png b/apps/python/F12020Leaderboard/ui/24_green.png new file mode 100644 index 0000000..94996e1 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/24_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/24_red.png b/apps/python/F12020Leaderboard/ui/24_red.png new file mode 100644 index 0000000..60fe497 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/24_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/25.png b/apps/python/F12020Leaderboard/ui/25.png new file mode 100644 index 0000000..9e87e4b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/25.png differ diff --git a/apps/python/F12020Leaderboard/ui/25_green.png b/apps/python/F12020Leaderboard/ui/25_green.png new file mode 100644 index 0000000..17ab1e9 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/25_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/25_red.png b/apps/python/F12020Leaderboard/ui/25_red.png new file mode 100644 index 0000000..cee105d Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/25_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/26.png b/apps/python/F12020Leaderboard/ui/26.png new file mode 100644 index 0000000..09bc98a Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/26.png differ diff --git a/apps/python/F12020Leaderboard/ui/26_green.png b/apps/python/F12020Leaderboard/ui/26_green.png new file mode 100644 index 0000000..05cdb60 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/26_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/26_red.png b/apps/python/F12020Leaderboard/ui/26_red.png new file mode 100644 index 0000000..faa5b3b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/26_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/27.png b/apps/python/F12020Leaderboard/ui/27.png new file mode 100644 index 0000000..5319235 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/27.png differ diff --git a/apps/python/F12020Leaderboard/ui/27_green.png b/apps/python/F12020Leaderboard/ui/27_green.png new file mode 100644 index 0000000..fb04caf Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/27_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/27_red.png b/apps/python/F12020Leaderboard/ui/27_red.png new file mode 100644 index 0000000..235ce7b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/27_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/28.png b/apps/python/F12020Leaderboard/ui/28.png new file mode 100644 index 0000000..43a0259 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/28.png differ diff --git a/apps/python/F12020Leaderboard/ui/28_green.png b/apps/python/F12020Leaderboard/ui/28_green.png new file mode 100644 index 0000000..fb79f1c Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/28_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/28_red.png b/apps/python/F12020Leaderboard/ui/28_red.png new file mode 100644 index 0000000..48cdec0 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/28_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/29.png b/apps/python/F12020Leaderboard/ui/29.png new file mode 100644 index 0000000..469cc0e Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/29.png differ diff --git a/apps/python/F12020Leaderboard/ui/29_green.png b/apps/python/F12020Leaderboard/ui/29_green.png new file mode 100644 index 0000000..4e35d65 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/29_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/29_red.png b/apps/python/F12020Leaderboard/ui/29_red.png new file mode 100644 index 0000000..d8b527a Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/29_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/2_green.png b/apps/python/F12020Leaderboard/ui/2_green.png new file mode 100644 index 0000000..89d799c Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/2_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/2_red.png b/apps/python/F12020Leaderboard/ui/2_red.png new file mode 100644 index 0000000..d6da5cf Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/2_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/3.png b/apps/python/F12020Leaderboard/ui/3.png new file mode 100644 index 0000000..6be2dca Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/3.png differ diff --git a/apps/python/F12020Leaderboard/ui/30.png b/apps/python/F12020Leaderboard/ui/30.png new file mode 100644 index 0000000..b16aff3 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/30.png differ diff --git a/apps/python/F12020Leaderboard/ui/30_green.png b/apps/python/F12020Leaderboard/ui/30_green.png new file mode 100644 index 0000000..e05bb27 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/30_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/30_red.png b/apps/python/F12020Leaderboard/ui/30_red.png new file mode 100644 index 0000000..29b6905 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/30_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/31.png b/apps/python/F12020Leaderboard/ui/31.png new file mode 100644 index 0000000..8314ad4 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/31.png differ diff --git a/apps/python/F12020Leaderboard/ui/31_green.png b/apps/python/F12020Leaderboard/ui/31_green.png new file mode 100644 index 0000000..fc2a822 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/31_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/31_red.png b/apps/python/F12020Leaderboard/ui/31_red.png new file mode 100644 index 0000000..e557392 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/31_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/32.png b/apps/python/F12020Leaderboard/ui/32.png new file mode 100644 index 0000000..06e2df5 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/32.png differ diff --git a/apps/python/F12020Leaderboard/ui/32_green.png b/apps/python/F12020Leaderboard/ui/32_green.png new file mode 100644 index 0000000..7c24391 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/32_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/32_red.png b/apps/python/F12020Leaderboard/ui/32_red.png new file mode 100644 index 0000000..d69078b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/32_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/3_green.png b/apps/python/F12020Leaderboard/ui/3_green.png new file mode 100644 index 0000000..82da02b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/3_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/3_red.png b/apps/python/F12020Leaderboard/ui/3_red.png new file mode 100644 index 0000000..735bcff Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/3_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/4.png b/apps/python/F12020Leaderboard/ui/4.png new file mode 100644 index 0000000..8a80099 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/4.png differ diff --git a/apps/python/F12020Leaderboard/ui/4_green.png b/apps/python/F12020Leaderboard/ui/4_green.png new file mode 100644 index 0000000..2e8ca0c Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/4_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/4_red.png b/apps/python/F12020Leaderboard/ui/4_red.png new file mode 100644 index 0000000..104da9b Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/4_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/5.png b/apps/python/F12020Leaderboard/ui/5.png new file mode 100644 index 0000000..fa196b1 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/5.png differ diff --git a/apps/python/F12020Leaderboard/ui/5_green.png b/apps/python/F12020Leaderboard/ui/5_green.png new file mode 100644 index 0000000..86219e5 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/5_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/5_red.png b/apps/python/F12020Leaderboard/ui/5_red.png new file mode 100644 index 0000000..7edb21a Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/5_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/6.png b/apps/python/F12020Leaderboard/ui/6.png new file mode 100644 index 0000000..49e0d52 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/6.png differ diff --git a/apps/python/F12020Leaderboard/ui/6_green.png b/apps/python/F12020Leaderboard/ui/6_green.png new file mode 100644 index 0000000..6790535 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/6_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/6_red.png b/apps/python/F12020Leaderboard/ui/6_red.png new file mode 100644 index 0000000..6e20152 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/6_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/7.png b/apps/python/F12020Leaderboard/ui/7.png new file mode 100644 index 0000000..10dba55 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/7.png differ diff --git a/apps/python/F12020Leaderboard/ui/7_green.png b/apps/python/F12020Leaderboard/ui/7_green.png new file mode 100644 index 0000000..ae1a376 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/7_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/7_red.png b/apps/python/F12020Leaderboard/ui/7_red.png new file mode 100644 index 0000000..e5940b6 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/7_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/8.png b/apps/python/F12020Leaderboard/ui/8.png new file mode 100644 index 0000000..b185a12 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/8.png differ diff --git a/apps/python/F12020Leaderboard/ui/8_green.png b/apps/python/F12020Leaderboard/ui/8_green.png new file mode 100644 index 0000000..99f42a1 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/8_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/8_red.png b/apps/python/F12020Leaderboard/ui/8_red.png new file mode 100644 index 0000000..1d8133a Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/8_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/9.png b/apps/python/F12020Leaderboard/ui/9.png new file mode 100644 index 0000000..25101fb Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/9.png differ diff --git a/apps/python/F12020Leaderboard/ui/9_green.png b/apps/python/F12020Leaderboard/ui/9_green.png new file mode 100644 index 0000000..837d4b5 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/9_green.png differ diff --git a/apps/python/F12020Leaderboard/ui/9_red.png b/apps/python/F12020Leaderboard/ui/9_red.png new file mode 100644 index 0000000..7a735d6 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/9_red.png differ diff --git a/apps/python/F12020Leaderboard/ui/number.psd b/apps/python/F12020Leaderboard/ui/number.psd new file mode 100644 index 0000000..2d7b958 Binary files /dev/null and b/apps/python/F12020Leaderboard/ui/number.psd differ diff --git a/constants.py b/constants.py deleted file mode 100644 index 6745f2f..0000000 --- a/constants.py +++ /dev/null @@ -1,87 +0,0 @@ -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.")