I have a working pygame menu, but there is one option I want to add. After executing the code behind this button, the menu should be return to the previous automatically
menu.add.button(‘no’, pgm.events.BACK)
menu.add.button(‘yes’,self.myScript)
Button NO works perfect
Def myScript:
os.remove(‘test.txt’)
pgm.events.BACK
The file is remover, but the menu doesn’t turn back (so of is not the same as in should be when clicking the NO button