From 283cf636c4902061a252d8ffd6db557519925568 Mon Sep 17 00:00:00 2001 From: wszqkzqk Date: Thu, 28 Jul 2022 05:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E8=BF=9B=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/menubar.py | 3 +-- source/constants.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/component/menubar.py b/source/component/menubar.py index eba6d17..44cfd47 100755 --- a/source/component/menubar.py +++ b/source/component/menubar.py @@ -34,8 +34,7 @@ class Card(): self.rect = self.orig_image.get_rect() self.rect.x = x self.rect.y = y - # 计划以后以此坐标进行相对变化,用字体绘制阳光消耗大小,不再采用现在的图片包含阳光方法 - # 以便减小程序体积并增加可维护性 + # 绘制植物阳光消耗大小 font = pg.font.Font(c.FONT_PATH, 12) self.sun_cost_img = font.render(str(c.PLANT_CARD_INFO[index][c.SUN_INDEX]), True, c.BLACK) self.sun_cost_img_rect = self.sun_cost_img.get_rect() diff --git a/source/constants.py b/source/constants.py index 966723c..5bd9b05 100755 --- a/source/constants.py +++ b/source/constants.py @@ -23,7 +23,7 @@ SCREEN_HEIGHT = 600 SCREEN_SIZE = (SCREEN_WIDTH, SCREEN_HEIGHT) # 字体路径 -FONT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)),'resources', 'DroidSansFallback.ttf') +FONT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources', 'DroidSansFallback.ttf') # 选卡数量 # 最大数量