X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/8a654eb43381bf77f3bade5a228809c90217d291..5034abc0164f6c09cb53291d2fe3e71c33cc4cf9:/src/minwii/widgets/column.py?ds=sidebyside diff --git a/src/minwii/widgets/column.py b/src/minwii/widgets/column.py index d829152..b113529 100755 --- a/src/minwii/widgets/column.py +++ b/src/minwii/widgets/column.py @@ -27,7 +27,7 @@ class Column(pygame.sprite.DirtySprite) : ''' colonne utilisée pour l'affichage d'une touche du clavier de jeu. ''' - def __init__(self, group, index, hue, rect, tone) : + def __init__(self, group, index, hue, rect, tone, displayNote=True) : pygame.sprite.DirtySprite.__init__(self, group) self.index = index self.state = False @@ -43,7 +43,8 @@ class Column(pygame.sprite.DirtySprite) : w, h = rect.w, rect.h tw, th, = toneName.get_size() toneRect = pygame.Rect(((w - tw) / 2, h - th), (tw, th)) - sur.blit(toneName, toneRect) + if displayNote : + sur.blit(toneName, toneRect) self.surOff = sur self.rectOff = rect @@ -58,7 +59,8 @@ class Column(pygame.sprite.DirtySprite) : self.surOn = gradients.vertical(rectOn.size, topRgba, bottomRgba) w, h = rectOn.w, rectOn.h toneRect = pygame.Rect(((w - tw) / 2, h - th), (tw, th)) - self.surOn.blit(toneName, toneRect) + if displayNote : + self.surOn.blit(toneName, toneRect) self.rectOn = rectOn self.image = self.surOff