mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-13 22:13:00 +00:00
current x postion tracking update for leaderboard
This commit is contained in:
@@ -813,11 +813,13 @@ class LeaderboardManager:
|
|||||||
|
|
||||||
current_x = 0
|
current_x = 0
|
||||||
|
|
||||||
for league_data in self.leaderboard_data:
|
for league_idx, league_data in enumerate(self.leaderboard_data):
|
||||||
league_key = league_data['league']
|
league_key = league_data['league']
|
||||||
league_config = league_data['league_config']
|
league_config = league_data['league_config']
|
||||||
teams = league_data['teams']
|
teams = league_data['teams']
|
||||||
|
|
||||||
|
logger.info(f"Drawing League {league_idx+1} ({league_key}) starting at x={current_x}px")
|
||||||
|
|
||||||
# Draw league logo section (full height)
|
# Draw league logo section (full height)
|
||||||
league_logo = self._get_league_logo(league_config['league_logo'])
|
league_logo = self._get_league_logo(league_config['league_logo'])
|
||||||
if league_logo:
|
if league_logo:
|
||||||
@@ -911,8 +913,10 @@ class LeaderboardManager:
|
|||||||
team_x += team_width
|
team_x += team_width
|
||||||
|
|
||||||
# Move to next league section (match width calculation logic)
|
# Move to next league section (match width calculation logic)
|
||||||
# current_x is currently at start of teams section, need to move to end of teams + spacing
|
# Update current_x to where team drawing actually ended
|
||||||
current_x += teams_width + 20 + spacing # Teams width + internal spacing + inter-league spacing
|
logger.info(f"League {league_idx+1} ({league_key}) teams ended at x={team_x}px")
|
||||||
|
current_x = team_x + 20 + spacing # team_x is at end of teams, add internal spacing + inter-league spacing
|
||||||
|
logger.info(f"Next league will start at x={current_x}px (gap: {20 + spacing}px)")
|
||||||
|
|
||||||
# Set total scroll width for dynamic duration calculation
|
# Set total scroll width for dynamic duration calculation
|
||||||
self.total_scroll_width = total_width
|
self.total_scroll_width = total_width
|
||||||
|
|||||||
Reference in New Issue
Block a user