fix: Ensure BDF font text is visible by setting correct draw object and updating display

This commit is contained in:
ChuckBuilds
2025-04-25 11:08:23 -05:00
parent 5b16540885
commit e36fac1357

View File

@@ -137,7 +137,11 @@ class BaseMLBManager:
status_width = self.display_manager.get_text_width(status_text, self.display_manager.calendar_font)
status_x = (width - status_width) // 2
status_y = 2
# Draw on the current image
self.display_manager.draw = draw
self.display_manager._draw_bdf_text(status_text, status_x, status_y, color=(255, 255, 255), font=self.display_manager.calendar_font)
# Update the display
self.display_manager.update_display()
# Format game date and time
game_time = datetime.fromisoformat(game_data['start_time'].replace('Z', '+00:00'))
@@ -167,7 +171,11 @@ class BaseMLBManager:
status_width = self.display_manager.get_text_width(status_text, self.display_manager.calendar_font)
status_x = (width - status_width) // 2
status_y = 2
# Draw on the current image
self.display_manager.draw = draw
self.display_manager._draw_bdf_text(status_text, status_x, status_y, color=(255, 255, 255), font=self.display_manager.calendar_font)
# Update the display
self.display_manager.update_display()
# Draw scores at the bottom (matching NHL layout) using PressStart2P
away_score = str(game_data['away_score'])