Пример #1
0
 def step(self, steps):
     self.stepsLeft -= steps-1
     ProgressBar.step(self)
     if self.stepsLeft <= 0.30 * self.steps:
         self.set_color(RED)
         self.show()
Пример #2
0
 def __init__(self, n):
     ProgressBar.__init__(self, width=150, steps=conf.maxhealth,
                             position=(640, (60*n+34)), color=(100, 100, 100))