更新 'button.py'

This commit is contained in:
206530212 2021-06-22 08:25:56 +08:00
parent 3da13c9d10
commit e4f980b40d
1 changed files with 7 additions and 1 deletions

View File

@ -3,4 +3,10 @@ import pygame.font
class Button():
def __init__(self, ai_settings, screen, msg):
def __init__(self, ai_settings, screen, msg):
"""初始化按钮的属性"""
self.screen = screen
self.screen_rect = screen.get_rect()
# 设置按钮的尺寸和其他属性
self.width, self.height = 200, 50