From 64d8236dc323ca156c03bcb71345230d3e4a3167 Mon Sep 17 00:00:00 2001 From: 206530212 <2122823223@qq.com> Date: Tue, 22 Jun 2021 15:16:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'button.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- button.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/button.py b/button.py index 34e9c2a..9d0895c 100644 --- a/button.py +++ b/button.py @@ -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对象,并使其居中 +