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') # 选卡数量 # 最大数量