diff options
author | Timm Weber <timm.weber@me.com> | 2015-08-08 03:59:04 +0200 |
---|---|---|
committer | Timm Weber <timm.weber@me.com> | 2015-08-08 03:59:04 +0200 |
commit | 18922c6138f2deb956e16cafbfe55c05add17fa1 (patch) | |
tree | 0b8113b49a568950c85d4cd56ff95a5c4e6c3954 /test.py | |
parent | 5e3c0df770b759ade210f3b6a4eafb5a0788912b (diff) |
cell name rendering
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -112,6 +112,12 @@ def drawCell(cell): if not (cell.is_ejected_mass or cell.is_food): gfxdraw.aacircle(screen, cx, cy, int(radius/2.5), (255,255,255)) gfxdraw.circle(screen, cx, cy, int(radius/2.5), (255,255,255)) + + font_size = 20 + pygame.font.init() + font = pygame.font.SysFont(pygame.font.get_default_font(), font_size) + surface = font.render(cell.name, 1, (0, 0, 0)) + screen.blit(surface, (cx - (surface.get_width()/2), cy + radius)) sub = MeinSubskribierer() c = client.Client(sub) @@ -128,7 +134,7 @@ c.send_facebook( print(c.is_connected) print(c.send_spectate()) -c.player.nick="Wyndfysch" +c.player.nick="test cell pls ignore" c.send_spectate() screensize=(800,600) |