更新 'button.py'

This commit is contained in:
206530212 2021-06-22 15:16:23 +08:00
parent 8aca54b43d
commit 64d8236dc3
1 changed files with 6 additions and 0 deletions

View File

@ -10,3 +10,9 @@ class Button():
# 设置按钮的尺寸和其他属性
self.width, self.height = 200, 50
self.button_color = (0, 255, 0)
self.text_color = (255, 255, 255)
self.font = pygame.font.SysFont('arial', 48)
# 创建按钮的rect对象并使其居中