From 41f0df237e9d048b8c89c7de1ae91736d0684dc9 Mon Sep 17 00:00:00 2001 From: Stan_Lewry Date: Fri, 23 Jul 2021 17:10:42 +0100 Subject: [PATCH] button widget missed propety names --- GUI/BasicButtonWidget.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GUI/BasicButtonWidget.py b/GUI/BasicButtonWidget.py index d8531da..332f40f 100644 --- a/GUI/BasicButtonWidget.py +++ b/GUI/BasicButtonWidget.py @@ -1,6 +1,5 @@ import GUI.Widget as Widget import Texture -from enum import Enum import pygame import os @@ -50,7 +49,7 @@ class BasicButtonWidget(Widget.Widget): def setSurface(self, buttonState) -> None: sourceRect = (buttonState * self.screenW, 0, self.screenW, self.screenH) self.surface.blit(self.buttonImage, (0,0), sourceRect) - text = Texture.fontDict[self.textSize].render(self.text, False, self.textCol) + text = Texture.fontDictDict[self.font][self.fontSize].render(self.text, False, self.colour) textRect = text.get_rect() textOriginX = (self.screenW / 2) - (textRect.w / 2) textOriginY = (self.screenH / 2) - (textRect.h / 2) -- 2.20.1