diff options
author | Kevin Hockey <Blitzkev@gmail.com> | 2010-08-05 00:51:36 (GMT) |
---|---|---|
committer | Kevin Hockey <Blitzkev@gmail.com> | 2010-08-05 00:51:36 (GMT) |
commit | fe0c4af2995529e0014ef285f70984dd7815836f (patch) | |
tree | 378cd52a717876d92529b14f09759417d5ba3a6c | |
parent | dd022bf1f2dec9b9d76d6c836fa2a812362384cd (diff) |
cast floats to ints in termbox
-rw-r--r-- | MAFH2/TermBox.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MAFH2/TermBox.py b/MAFH2/TermBox.py index 2c93cfc..295635d 100644 --- a/MAFH2/TermBox.py +++ b/MAFH2/TermBox.py @@ -9,11 +9,12 @@ class TermBox(GameEngineElement): self.max_lines = lines self.x = x self.y = y - surf = pygame.Surface((width,height)) + surf = pygame.Surface((int(width),int(height))) surf.fill([0,0,0]) self.box = DrawableObject([surf],"") - self.box.setPosition(x,y) + self.box.setPosition(int(x),int(y)) self.font = pygame.font.Font(None, 20) + print width,height,x,y self.__lines = [] for i in range(lines): self.__lines.append(DrawableFontObject('', self.font)) |