Skip to content

Commit

Permalink
Fixes fade effect
Browse files Browse the repository at this point in the history
  • Loading branch information
erodozer committed Jun 16, 2011
1 parent 622858a commit 9ccdd84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Rockmeter.py
Expand Up @@ -546,13 +546,13 @@ def __init__(self, layer, section):
#the current color of the image
self.currentColor = list(color)
if len(self.currentColor) == 3:
self.currentColor.append(255.0)
self.currentColor.append(1.0)

#the color to fade to
color = list(self.engine.theme.hexToColor(self.get("fadeTo", str, "#FFFFFF")))
#makes sure alpha is added
if len(color) == 3:
color.append(255.0)
color.append(1.0)

#the colors to alternate between
self.colors = [color, self.currentColor]
Expand All @@ -567,7 +567,7 @@ def __init__(self, layer, section):

def updateRates(self):
t = self.transitionTime * (max(self.engine.clock.get_fps(), _minFPS)) / 1000.0
self.rates = [(self.colors[0][i] - self.colors[1][i])*t
self.rates = [(self.colors[0][i] - self.colors[1][i])/t
for i in range(4)]

def update(self):
Expand Down

0 comments on commit 9ccdd84

Please sign in to comment.