def display(self):
     g.screen.fill((255, 255, 192))
     g.screen.blit(g.bgd, (g.x0, 0))
     self.acr.draw()
     utils.centre_blit(g.screen, g.scores, g.scores_c)
     utils.display_number(g.score, g.score_c, g.font1)
     pygame.draw.rect(g.screen, utils.BLACK, g.vinc)
     utils.display_number(g.target, g.target_c, g.font1)
     utils.text_blit1(g.screen,g.percent,g.font1,g.percent_xy,\
                      utils.BLACK,False)
     if g.best > 0:
         s = 'Best: ' + str(g.best) + '%'
         utils.text_blit1(g.screen, s, g.font1, g.best_xy, utils.BLACK,
                          False)
     if g.count == 2:
         utils.text_blit(g.screen, 'twice', g.font3, g.count_c,
                         utils.ORANGE, False)
     if g.count > 2:
         s = str(g.count) + ' times'
         utils.text_blit(g.screen, s, g.font3, g.count_c, utils.ORANGE,
                         False)
     buttons.draw()
     if self.acr.message != None:
         utils.message1(g.screen, g.font1, self.acr.message, g.message_c)
     if g.help_on:
         utils.centre_blit(g.screen, g.help_img, g.help_cxy)
Пример #2
0
 def display(self):
     if g.map1:
         self.map1.draw()
     elif g.pages:
         self.pages.draw()
     else:
         if g.offset > 0: g.screen.fill(utils.CREAM)
         g.screen.blit(g.bgd, g.xy0)
         utils.centre_blit(g.screen, g.pic, g.xyc)
         self.ctry.draw()
         if self.ctry.message != None:
             utils.message1(\
                 g.screen,g.font2,self.ctry.message,self.ctry.message_c)
     buttons.draw()