fixed spacing issues with new date format for league prof

This commit is contained in:
Justin 2023-04-27 18:40:04 +08:00 committed by GitHub
parent 3e6a263cf3
commit 949b64f28c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3792,6 +3792,15 @@ class StockTicker():
vs_timage = self.textImage('vs', font, r = 255, g = 255, b = 255, h_buff = 5)
x_offsetdate2 = x_offset + int((hc_timage.size[0] + vs_timage.size[0] + ac_timage.size[0])/2)- int(date_timage.size[0]/2)
if date_timage.size[0] > (ac_timage.size[0] + vs_timage.size[0] + hc_timage.size[0]):
x_offset3 = x_offset + int(date_timage.size[0]/2)
img.paste(date_timage, (x_offset,0))
x_offset += date_timage.size[0]
img.paste(ac_timage, (x_offset3 - int(ac_timage.size[0]) - int(vs_timage.size[0]/2), 5))
img.paste(vs_timage, (x_offset3 - int(vs_timage.size[0]/2), 5))
img.paste(hc_timage, (x_offset3 + int(vs_timage.size[0]/2), 5))
else:
img.paste(date_timage, (x_offsetdate2,0))
x_offsetdate2 += date_timage.size[0]
img.paste(ac_timage, (x_offset, 5))
@ -3800,6 +3809,15 @@ class StockTicker():
x_offset += vs_timage.size[0]
img.paste(hc_timage, (x_offset, 5))
x_offset += hc_timage.size[0]
#img.paste(date_timage, (x_offsetdate2,0))
#x_offsetdate2 += date_timage.size[0]
#img.paste(ac_timage, (x_offset, 5))
#x_offset += ac_timage.size[0]
#img.paste(vs_timage, (x_offset, 5))
#x_offset += vs_timage.size[0]
#img.paste(hc_timage, (x_offset, 5))
#x_offset += hc_timage.size[0]
#x_offset += max(date_timage.size[0], (hc_timage.size[0] + vs_timage.size[0] + ac_timage.size[0]))
else:
score_image = self.textImage(intAwayScore + '-' + intHomeScore, font, h_buff = 5, r = 255, g = 255, b = 255)