예제 #1
0
파일: event.py 프로젝트: jochil/pytemo
    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)
예제 #2
0
파일: calendar.py 프로젝트: jochil/pytemo
 def __init__(self, size):
     BaseWidget.__init__(self, size)
예제 #3
0
파일: popup.py 프로젝트: jochil/pytemo
 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)