This commit is contained in:
NikolajDanger
2020-08-13 17:27:37 +02:00
parent 8005acf42a
commit 4f30c6a196
6 changed files with 9 additions and 14 deletions

View File

@ -1,5 +1,4 @@
import math
import os
from PIL import Image, ImageDraw, ImageFont
from funcs import logThis
@ -161,10 +160,10 @@ class DrawHex():
try:
with Image.open(FILEPATH) as im:
d = ImageDraw.Draw(im,"RGBA")
# Write player names and color
for p in [1,2]:
playername = getName(game["players"][p%2])
playername = self.bot.funcs.getName(game["players"][p%2])
x = X_NAME[p]
x -= NAME_fnt.getsize(playername)[0] if p==2 else 0 # player2's name is right-aligned