-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu Quit Error : SystemExit on VS Code #251
Comments
how do you run your script? I can't manage to get this same error even with tests |
Exit event call the following:
|
Maybe |
I think this fixes the issue, but sadly I cannot test... def _exit(self):
"""
Internal exit function.
:return: None
"""
self.disable()
pygame.quit()
try:
sys.exit(0)
except SystemExit:
os._exit(1) |
bad code# None of this can fixed that situation
menu.add_button('Quit', exit(0))
menu.add_button('Quit', pygame.quit())
menu.add_button('Quit', sys.exit(0))
menu.add_button('Quit', os._exit(1)) how I run my scriptRun the example code by VS Code with extension called some temp work
def quitgame():
# do things
exit(0)
menu.add_button('Quit', quitgame) |
New verison 3.5.1 work well. You guys really do a good thing |
Env
Error
code
desc by VS Code
When I click the last menuitem called "QUIT", it just call this exception error
Then I try to replace
pygame_menu.events.EXIT
withexit(0)
orpygame_menu.events.close
, but it does't help.The text was updated successfully, but these errors were encountered: