added draw state to ufc
This commit is contained in:
parent
dc1a471f88
commit
0d5faa7473
@ -2819,6 +2819,8 @@ class StockTicker():
|
||||
elif time == 'past':
|
||||
if fight['fighter1win']:
|
||||
win1_img = self.textImage('WIN', extra_small_font, r=0, g=255, b=0)
|
||||
elif not fight['fighter1win'] and not fight['fighter2win']:
|
||||
win1_img = self.textImage('DRAW', extra_small_font, r=80, g=80, b=80)
|
||||
else:
|
||||
win1_img = self.textImage('LOSS', extra_small_font, r=0, g=255, b=0)
|
||||
|
||||
@ -2848,6 +2850,8 @@ class StockTicker():
|
||||
elif time == 'past':
|
||||
if fight['fighter1win']:
|
||||
draw.text((widest - int(weight_img.size[0]/2) - win1_img.size[0] - 2,0), 'WIN', fill=(0,255,0),font=extra_small_font)
|
||||
elif not fight['fighter1win'] and not fight['fighter2win']:
|
||||
draw.text((widest - int(weight_img.size[0]/2) - win1_img.size[0] - 2,0), 'DRAW', fill=(80,80,80),font=extra_small_font)
|
||||
else:
|
||||
draw.text((widest - int(weight_img.size[0]/2) - win1_img.size[0] - 2,0), 'LOSS', fill=(255,0,0),font=extra_small_font)
|
||||
|
||||
@ -2887,6 +2891,8 @@ class StockTicker():
|
||||
elif time == 'past':
|
||||
if fight['fighter2win']:
|
||||
draw.text((widest + int(weight_img.size[0]/2) + 2,0), 'WIN', fill=(0,255,0),font=extra_small_font)
|
||||
elif not fight['fighter2win'] and not fight['fighter1win']:
|
||||
draw.text((widest + int(weight_img.size[0]/2) + 2,0), 'DRAW', fill=(80,80,80),font=extra_small_font)
|
||||
else:
|
||||
draw.text((widest + int(weight_img.size[0]/2) + 2,0), 'LOSS', fill=(255,0,0),font=extra_small_font)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user