Beispiel #1
0
# utworzenie okna
window = pygame.display.set_mode(my_siz_org, HWSURFACE | DOUBLEBUF | RESIZABLE)
pygame.mouse.set_visible(1)
pygame.event.set_grab(0)

window.fill(BLACK)
# ustawiamy etykiete
pygame.display.set_caption(my_title)
# pobieramy informacje o ekranie - tle
screen = pygame.display.get_surface()

while not done:
    # EVENT PROCESSING STEP

    func.print_value(screen, "Press SPACE to START", "Impact", 90, WHITE, 200,
                     200)
    pygame.display.update()

    func.print_value(screen, "Press SPACE to START", "Impact", 90, RED, 200,
                     200)
    pygame.display.update()
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
        elif event.type == pygame.KEYDOWN:
            if event.key == pygame.K_ESCAPE:
                # on exit if running from IDLE.
                pygame.quit()
                sys.exit()
            elif event.key == pygame.K_SPACE:
Beispiel #2
0
 def draw_box(self, wher, color, color_txt, text, screen):
     self.rect = pygame.draw.rect(screen, color, wher)
     func.print_value(screen, text, "Arial", wher[3] - (wher[3] / 6),
                      color_txt, wher[0], wher[1])