Ejemplo n.º 1
0
 def __init__(self,
                 w=None,
                 steps=100,
                 position=None,
                 color=BLACK,
                 width=None,
                 height=10,
                 fill=1,
                 border=0,
                 borderColor=WHITE):
     if width is None:
         width = conf.WINWIDTH - 50
         
     self.original_color = color
     self.set_color(color)
     self.width = width
     self.height = height
     
     Rectangle.__init__(self, w, width, height, color=color)
     self.image.set_colorkey(TRANSPARENT)
     if position is None:
         self.center(y=-20)
     else:
         self.set_position(position)
         
     self.fill_bar = fill
     self.add_progress(steps)
     self.set_collision_rect(self.image.get_rect())
Ejemplo n.º 2
0
 def __init__(self,
                 w=None,
                 steps=100,
                 position=None,
                 color=BLACK,
                 width=10,
                 height=None,
                 fill=1):
     if height is None:
         height = conf.WINHEIGHT-60
     self.original_color = color
     self.set_color(color)
     self.width = width
     self.height = height
     Rectangle.__init__(self, w, width, height, color=color)
     self.image.set_colorkey(TRANSPARENT)
     if position is None:
         self.center(x=30)
     else:
         self.set_position(position)
     self.fill_bar = fill
     self.add_progress(steps)
     self.set_collision_rect(self.image.get_rect())