- def __init__(self, group, hue, rect, tone) :
- pygame.sprite.Sprite.__init__(self, group)
- sur = pygame.surface.Surface(rect.size)
- rgba = hls_to_rgba_8bits(hue, OFF_LUMINANCE, OFF_SATURATION)
- sur.fill(rgba)
- self.stateOff = sur
- self.rectOff = rect
-
- topRgba = hls_to_rgba_8bits(hue, ON_TOP_LUMINANCE, ON_SATURATION, ON_COLUMN_ALPHA)
- bottomRgba = hls_to_rgba_8bits(hue, ON_BOTTOM_LUMINANCE, ON_SATURATION, ON_COLUMN_ALPHA)
- onWidth = rect.width * ON_COLUMN_OVERSIZING
- onLeft = rect.centerx - onWidth / 2
- rectOn = pygame.Rect((onLeft, 0),
- (onWidth, rect.height))
- self.stateOn = gradients.vertical(rectOn.size, topRgba, bottomRgba)
- self.rectOn = rectOn
-
- self.image = self.stateOff
- self.rect = rect
- self.toneName = FONT.render(tone.nom, True, (0,0,0))
+ def __init__(self, synth, song, mode=PLAYING_MODES['NORMAL']) :
+ super(SongPlayingScreen, self).__init__(synth, song.distinctNotes)
+ self.song = song
+ self.currentColumn = None
+ self.noteIterator = self.song.iterNotes()
+ self.displayNext()