Abdur-rahmaanJ / hooman

~ pygame for humans (pip install hooman) (p5js api) (63k+ downloads)
https://abdur-rahmaanj.github.io/hooman/gallery
MIT License
48 stars 45 forks source link

Update cube3d.py #112

Closed srivamsidandu closed 1 month ago

srivamsidandu commented 9 months ago

In this modified version, I removed the elif event.type == hapi.pygame.MOUSEBUTTONUP block and the draging = False line from that block. Additionally, I removed the try, except, else, and finally blocks, as they weren't necessary for the suggested modification.

Now, the pygame.QUIT event is directly handled in the event loop, and if that event is detected, it sets hapi.is_running to False and breaks out of the loop. This should provide a cleaner and more direct exit mechanism when the quit button is pressed.

Abdur-rahmaanJ commented 9 months ago

@TheBigKahuna353 Is it fixed?

srivamsidandu commented 9 months ago

Yes i have changed it you can check it in the commits And i have also pull requested for this please merge it if you find no errors