Beispiel #1
0
    def __init__(self, size):
        # check for min. size
        if size[0] < self._box_size[0] or size[1] < self._box_size[1]:
            raise Exception('widget size is less than minimum w: %s, h: %s' % self._box_size)

        # calculate max. amount of concurrent visible boxes
        self._limit = int(size[1] / (self._box_size[1] + self._box_padding))

        BaseWidget.__init__(self, size)
Beispiel #2
0
 def __init__(self, size):
     BaseWidget.__init__(self, size)
Beispiel #3
0
 def __init__(self, size):
     self._total_size = (pygame.display.get_surface().get_width(),
                         pygame.display.get_surface().get_height())
     self._box_size = size
     BaseWidget.__init__(self, self._total_size)