From e7234ee1b1b56a9cc1f95ede4f38c930e9310ee8 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Tue, 28 Jul 2020 14:25:31 +0200 Subject: [PATCH] :art: Prettyfying --- funcs/games/blackjackDraw.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/funcs/games/blackjackDraw.py b/funcs/games/blackjackDraw.py index 873e2da..4fc20d1 100644 --- a/funcs/games/blackjackDraw.py +++ b/funcs/games/blackjackDraw.py @@ -28,14 +28,18 @@ def drawImage(channel): userHand = drawHand(value["hand"],False,value["busted"],value["blackjack"]) textWidth = fnt.getsize(key)[0] table.paste(userHand,(32+(384*placement[x]),680),userHand) - textImage.text((32+(384*placement[x])+117-int(textWidth/2),1010),key,fill=(0,0,0), font=fnt) + + textImage.text((32+(384*placement[x])+117-int(textWidth/2)-3,1010-3),key,fill=(0,0,0), font=fnt) + textImage.text((32+(384*placement[x])+117-int(textWidth/2)+3,1010-3),key,fill=(0,0,0), font=fnt) + textImage.text((32+(384*placement[x])+117-int(textWidth/2)-3,1010+3),key,fill=(0,0,0), font=fnt) + textImage.text((32+(384*placement[x])+117-int(textWidth/2)+3,1010+3),key,fill=(0,0,0), font=fnt) + textImage.text((32+(384*placement[x])+117-int(textWidth/2),1005),key,fill=(255,255,255), font=fnt) table.save("resources/games/tables/blackjackTable"+channel+".png") return def drawHand(hand, dealer, busted, blackjack): - print(str(hand)+str(blackjack)) fnt = ImageFont.truetype('resources/futura-bold.ttf', 200) fnt2 = ImageFont.truetype('resources/futura-bold.ttf', 120) length = len(hand) @@ -67,7 +71,6 @@ def drawHand(hand, dealer, busted, blackjack): textImage.text((int(w/2)-int(textWidth/2),430),"BUSTED",fill=(255,50,50), font=fnt) elif blackjack: textWidth = fnt2.getsize("BLACKJACK")[0] - print(textWidth) textImage.text((int(w/2)-int(textWidth/2)-6,450-6),"BLACKJACK",fill=(0,0,0), font=fnt2) textImage.text((int(w/2)-int(textWidth/2)+6,450-6),"BLACKJACK",fill=(0,0,0), font=fnt2) textImage.text((int(w/2)-int(textWidth/2)-6,450+6),"BLACKJACK",fill=(0,0,0), font=fnt2)