Move date below 'Next Game' for upcoming NHL games

This commit is contained in:
ChuckBuilds
2025-04-19 13:27:58 -05:00
parent 7953ae5d09
commit 8320e16d03

View File

@@ -382,24 +382,24 @@ class BaseNHLManager:
game_date = game.get("game_date", "")
game_time = game.get("game_time", "")
# Calculate position for the date text (centered horizontally, above center)
date_width = draw.textlength(game_date, font=self.fonts['time'])
date_x = (self.display_width - date_width) // 2
date_y = center_y - 15 # Position above center
draw.text((date_x, date_y), game_date, font=self.fonts['time'], fill=(255, 255, 255))
# Calculate position for the time text (centered horizontally, below center)
time_width = draw.textlength(game_time, font=self.fonts['time'])
time_x = (self.display_width - time_width) // 2
time_y = center_y + 5 # Position below center
draw.text((time_x, time_y), game_time, font=self.fonts['time'], fill=(255, 255, 255))
# Show "Next Game" at the top
status_text = "Next Game"
status_width = draw.textlength(status_text, font=self.fonts['status'])
status_x = (self.display_width - status_width) // 2
status_y = 5
draw.text((status_x, status_y), status_text, font=self.fonts['status'], fill=(255, 255, 255))
# Calculate position for the date text (centered horizontally, below "Next Game")
date_width = draw.textlength(game_date, font=self.fonts['time'])
date_x = (self.display_width - date_width) // 2
date_y = status_y + 15 # Position below "Next Game"
draw.text((date_x, date_y), game_date, font=self.fonts['time'], fill=(255, 255, 255))
# Calculate position for the time text (centered horizontally, in center)
time_width = draw.textlength(game_time, font=self.fonts['time'])
time_x = (self.display_width - time_width) // 2
time_y = center_y # Position in center
draw.text((time_x, time_y), game_time, font=self.fonts['time'], fill=(255, 255, 255))
else:
# For live/final games, show scores and period/time
home_score = str(game.get("home_score", "0"))