fix text not going under

This commit is contained in:
2026-08-03 21:37:20 -04:00
parent 1e08327c1f
commit 52afd88712
+16 -8
View File
@@ -135,16 +135,24 @@ def draw_text_overlay(canvas, players, scroll_x, dest_x=0, width=PANEL_WIDTH):
x += dest_x x += dest_x
graphics.DrawText(canvas, font, x + 35, 15, name_x = x + 35
rbg(Colors.WHITE.value), player['abbr_name']) if name_x >= dest_x:
graphics.DrawText(canvas, font_small, x + 35, 25, graphics.DrawText(canvas, font, name_x, 15,
rbg(Colors.WHITE.value), player['position']) rbg(Colors.WHITE.value), player['abbr_name'])
pos_x = x + 35
if pos_x >= dest_x:
graphics.DrawText(canvas, font_small, pos_x, 25,
rbg(Colors.WHITE.value), player['position'])
if player['injury_status'] and player['injury_body_part']: if player['injury_status'] and player['injury_body_part']:
graphics.DrawText(canvas, font_small, x + 50, 25, status_x = x + 50
rbg(Colors.RED.value), f"{str(player['injury_status'])} - ") if status_x >= dest_x:
graphics.DrawText(canvas, font_super_small, x + 70, 25, graphics.DrawText(canvas, font_small, status_x, 25,
rbg(Colors.RED.value), str(player["injury_body_part"])) rbg(Colors.RED.value), f"{str(player['injury_status'])} - ")
part_x = x + 70
if part_x >= dest_x:
graphics.DrawText(canvas, font_super_small, part_x, 25,
rbg(Colors.RED.value), str(player["injury_body_part"]))
# # if the time is shown it should be split between lines # # if the time is shown it should be split between lines
# # if not, just display the status # # if not, just display the status