Esempio n. 1
0
            Particle.Particle(random.randint(0, settings.WINDOW_WIDTH),
                              random.randint(0, settings.WINDOW_HEIGHT),
                              surface1))

    #input_box = TextBox.TextBox(50, 50, 100, 100)

    # will open and update the settings screen
    while (running):

        # checks the events and stops the program from running if the "X" was pressed
        events = pygame.event.get()
        for event in events:
            # user clicked draw
            if event.type == pygame.MOUSEBUTTONDOWN:
                mouse_pos = pygame.mouse.get_pos()
                if (button.Collide(mouse_pos, button.get_rect())):
                    running = False
            if event.type == pygame.QUIT:
                generate = False
                running = False

        screen.fill(settings.BG_COLOR)
        surface1.fill(settings.BG_COLOR)
        #input_box.Update(events)
        #input_box.Draw(surface1)

        button.Draw(surface1)

        screen.blit(surface1, (0, 0))
        pygame.display.flip()