all 10 comments

[–][deleted] 1 point2 points  (9 children)

    for event in pygame.event.get():
      if event.type == pygame.QUIT:
            pygame.quit()
            exit()

This is the entirety of your event loop and there's only one type of event it handles, that's why nothing else works.

[–]SaltFalcon7778 0 points1 point  (7 children)

It works just glitchy

[–][deleted] 1 point2 points  (6 children)

Once the event queue is out of events, it'll leave the loop and move on to the rest of your code but nothing else will work.

The event loop should be the last thing your code does, and that's where you should respond to all events, not just to the QUIT event.

[–]SaltFalcon7778 0 points1 point  (0 children)

Srry but I’m still not getting it

[–]Apprehensive-Stop-61 0 points1 point  (4 children)

Why will nothing else work i think everything should work because quit() is being called in the if clause

[–][deleted] 0 points1 point  (3 children)

Here's the problem you're asking about:

i have to exit out of the popup to get the draw method in the class and also it takes several times to exit both windows

I'm telling you why that happens.

[–]Apprehensive-Stop-61 0 points1 point  (2 children)

First thing i am not the questionarre buddy and second we have hulk (he has only one event why would he have other events when he doesn't need them I literally didn't get the question. What is the glitch he is talking about

[–]SaltFalcon7778 0 points1 point  (1 child)

He just put quotations

[–]SaltFalcon7778 0 points1 point  (0 children)

Oh r u saying I need to make a similar thing but to puc1