Exemplo n.º 1
0
 def on_app(self):
     '''Called when this element is associated with an App. Initializes drawables.'''
     self.image = Sprite(
         app=self.app,
         surface=pygame.image.load('res/img/splash.png').convert(),
         x=0,
         y=0)
Exemplo n.º 2
0
 def make_box(self):
     '''Called when this text entry box is associated with an App, creates the box drawable'''
     self.box = Sprite(
         app=self.app,
         surface=pygame.image.load('res/img/box_400px.png').convert(),
         x=50,
         y=460)
Exemplo n.º 3
0
 def on_app(self):
     '''Called when this element is associated with an App. Initializes drawables.'''
     Element.on_app(self)
     self.image = Sprite(
         app=self.app,
         surface=pygame.image.load('res/img/help1.png').convert(),
         x=0,
         y=300)
     self.current = 1
Exemplo n.º 4
0
 def on_app(self):
     '''Called when this element is associated with an App. Initializes drawables.'''
     Button.on_app(self)
     self.box = Sprite(app=self.app,
                       surface=pygame.image.load(
                           'res/img/button_75px_gray.png').convert(),
                       x=415,
                       y=560)
     self.label = Label(app=self.app,
                        font=pygame.font.Font('res/font/Oswald-Regular.ttf',
                                              16),
                        text='Next',
                        x=415,
                        y=560,
                        color=COLOR.WHITE,
                        center_x=75)
Exemplo n.º 5
0
 def on_app(self):
     '''Called when this element is associated with an App. Initializes drawables.'''
     Button.on_app(self)
     self.box = Sprite(app=self.app,
                       surface=pygame.image.load(
                           'res/img/button_150px_red.png').convert(),
                       x=300,
                       y=230)
     self.label = Label(app=self.app,
                        font=pygame.font.Font('res/font/Oswald-Regular.ttf',
                                              42),
                        text='Start',
                        x=300,
                        y=230,
                        color=COLOR.WHITE,
                        center_x=150,
                        center_y=60)
Exemplo n.º 6
0
 def on_app(self):
     '''Called when this element is associated with an app. Initializes drawables.'''
     Element.on_app(Element)
     surface = pygame.Surface((500, 300))
     surface.fill((255, 255, 255))
     self.image = Sprite(app=self.app, surface=surface, x=0, y=0)