X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/c469bfe0b89e42f313651c097ac7bedd5cd0cae6..f6ca219fa69085fbbf9feff7ab72c51e805bc9bb:/src/app/widgets/column.py diff --git a/src/app/widgets/column.py b/src/app/widgets/column.py index 92f53ba..e55b935 100755 --- a/src/app/widgets/column.py +++ b/src/app/widgets/column.py @@ -24,7 +24,7 @@ from config import FONT_COLOR class Column(pygame.sprite.DirtySprite) : - def __init__(self, group, hue, rect, tone) : + def __init__(self, group, hue, rect, tone, atBorder) : pygame.sprite.DirtySprite.__init__(self, group) self.state = False @@ -51,6 +51,9 @@ class Column(pygame.sprite.DirtySprite) : onLeft = rect.centerx - onWidth / 2 rectOn = pygame.Rect((onLeft, 0), (onWidth, rect.height)) + if atBorder : + setattr(rectOn, atBorder, getattr(rect, atBorder)) + self.surOn = gradients.vertical(rectOn.size, topRgba, bottomRgba) w, h = rectOn.w, rectOn.h toneRect = pygame.Rect(((w - tw) / 2, h - th), (tw, th))