Beispiel #1
0
    def _draw(self):
        if not skin.active():
            return;

        if not self.width or not self.height:
            raise TypeError, 'Not all needed variables set.'

        if not self.full:
            # catch division by zero error.
            return

        position = min((self.position * 100) / self.full, 100)
        width, height = self.get_size()

        self.surface = self.get_surface()

        self.surface.fill(self.bg_color.get_color_sdl())
        self.surface.set_alpha(self.bg_color.get_alpha())

        box = self.osd.Surface(((width * position ) / 100 , height), 0, 32)
        box.fill(self.selected_bg_color.get_color_sdl())
        box.set_alpha(self.selected_bg_color.get_alpha())

        self.surface.blit(box, (0,0))
        Container._draw(self)
    def _draw(self):
        """
        The actual internal draw function.
        """

        rect = self.content_layout.types['button'].rectangle
        self.surface = self.get_surface()
        self.osd.drawroundbox(0, 0, self.width, self.height, rect.bgcolor, 0,
                              rect.color, 0, self.surface)
        Container._draw(self)
Beispiel #3
0
    def _draw(self):
        """
        The actual internal draw function.
        """

        rect = self.content_layout.types['button'].rectangle
        self.surface = self.get_surface()
        self.osd.drawroundbox(0, 0, self.width, self.height, rect.bgcolor, 0, rect.color,
                              0, self.surface)
        Container._draw(self)
Beispiel #4
0
 def _draw(self):
     self.surface = self.get_surface()
     Container._draw(self)
Beispiel #5
0
 def _draw(self):
     self.surface = self.get_surface()
     Container._draw(self)