i do see the buttons, but they are completely unresponsive and even not rendering every frame. You have a lot of poor programming practices in this one piece of code. If i fixed your code to work, i would completely have to rewrite it. Fixing it to just work now is setting you up for failure in t he future.
1)There should only ever be one line in your code of
2) There is a reason we use classes. Buttons are complex enough that it is much simpler to handle them in classes. As a bonus you wont have confusing 11 parameters to one function anymore.
3) You are creating and running the button in the middle of the main game loop. The buttons should be created beforehand, and only update and draw methods should be in the main game loop.
Here are some links that i would suggest to read thoroughly.
state machine
user interface
classes
1)There should only ever be one line in your code of
pygame.display.update()and it should reside in your main game loop. The fact that you have more than one is a sign that you are creating your structure incorrectly and you are making spaghetti code. As a result the code is not working correctly and is really hard to fix. The more that is added, the worse it gets.
2) There is a reason we use classes. Buttons are complex enough that it is much simpler to handle them in classes. As a bonus you wont have confusing 11 parameters to one function anymore.
3) You are creating and running the button in the middle of the main game loop. The buttons should be created beforehand, and only update and draw methods should be in the main game loop.
Here are some links that i would suggest to read thoroughly.
state machine
user interface
classes
Recommended Tutorials: