- def __init__(self, color) :
- pass
\ No newline at end of file
+ def __init__(self, hue, rect) :
+ pygame.sprite.Sprite.__init__(self)
+ sur = Surface(rect.size)
+ rgba = hls_to_rgb(hue, OFF_LUMINANCE, OFF_SATURATION) + (255,)
+ sur.fill(rgba)
+ self.stateOff = sur
+
+ topRgba = hls_to_rgb(hue, ON_TOP_LUMINANCE, ON_SATURATION) + (255,)
+ bottomRgba = hls_to_rgb(hue, ON_BOTTOM_LUMINANCE, ON_SATURATION) + (255,)
+ size = rect.inflate(2*rect.width,0).size
+ self.stateOn = gradients.vertical(size, topRgba, bottomRgba)
+
\ No newline at end of file