Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions code/humanImager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ def renderTextCenteredAt(text, font, colour, x, y, screen, allowed_width):
# we'll render each line below the last, so we need to keep track of
# the culmative height of the lines we've rendered so far
y_offset = 40
for i in range(len(lines)):
fw, fh = font.size(lines[i])
for i, line in enumerate(lines):
fw, fh = font.size(line)

# (tx, ty) is the top-left of the font surface
tx = x - fw / 2
ty = y + y_offset*i

font_surface = font.render(lines[i], True, colour)
font_surface = font.render(line, True, colour)
screen.blit(font_surface, (tx, ty))



parser = argparse.ArgumentParser(description='blah')
parser.add_argument('--input_file', type=str, help='the script')
args = parser.parse_args()
Expand Down