Hides a button by clearing its turtle.
(name)
| 70 | buttons[name] = {'turtle': button_turtle, 'x': x, 'y': y, 'w': width, 'h': height, 'visible': True} |
| 71 | |
| 72 | def hide_button(name): |
| 73 | """Hides a button by clearing its turtle.""" |
| 74 | if name in buttons and buttons[name]['visible']: |
| 75 | buttons[name]['turtle'].clear() |
| 76 | buttons[name]['visible'] = False |
| 77 | |
| 78 | def manage_buttons(): |
| 79 | """Shows or hides buttons based on the current game state.""" |