Skip to content

Commit

Permalink
Make sure the values of rect are floats.
Browse files Browse the repository at this point in the history
  • Loading branch information
erodozer committed Jun 6, 2011
1 parent 08898f3 commit 9489841
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Rockmeter.py
Expand Up @@ -186,10 +186,11 @@ def __init__(self, stage, section, drawing):

#these are the images that are drawn when the layer is visible
self.drawing = self.engine.loadImgDrawing(self, None, drawing)
self.rectexpr = self.getexpr("rect", "(0,1,0,1)")
self.rect = eval(self.rectexpr) #how much of the image do you want rendered
self.rectexpr = self.getexpr("rect", "(0.0,1.0,0.0,1.0)")
self.rect = [float(i) for i in eval(self.rectexpr)]
#how much of the image do you want rendered
# (left, right, top, bottom)

def updateLayer(self, playerNum):
w, h, = self.engine.view.geometry[2:4]
texture = self.drawing
Expand Down

0 comments on commit 9489841

Please sign in to comment.